Reputation: 1368
I have a slideToggle that shows/hides a table.
jQuery
$("#featMoreInfo").click(function() {
$("#featben2").slideToggle('slow');
var txt = $(this).text() == '+ More Info' ? '- Minimize' : '+ More Info';
$(this).text(txt);
});
$("#featMoreInfo2").click(function() {
$('html, body').animate({ scrollTop: 0 }, 'slow');
$("#featben2").slideToggle('slow');
$("#featMoreInfo").text('+ More Info');
});
I have a javascript tooltip in some of the columns. Occationally whenever you click + More Info
the alignment gets thrown off. Has anyone had this issue before?
Upvotes: 0
Views: 366
Reputation: 181
This is a known bug with jQuery, http://api.jquery.com/slideToggle/#comment-82454830, its due to jQuery being unable to calculate and render their correct height of table row / cells.
I've had this problem in a project and ended up using another effect as it was unstable and so wasn't fit for production.
Did a quick search and found a post by spankmaster79 who answered this question and suggested a fix so this post might be worth a read. jQuery slideToggle jump on close
Upvotes: 1