tags:

views:

102

answers:

1

What are some of the more practiced methods of speeding up jquery animations across all browsers? I'm currently using jquery with a GridView(Table) and it's lagging and lagging making the slideUp() slideDown() unusable.

Links other then jquery.com are greatly appreciated.

$(document).ready(function(){
$("#GridTable td").click(function() {

 $(this).parent.slideToggle("normal");
});
});

Not complicated code. Just very sloooow. Mind you I have a gridview with millions of records. It would be nice to find out some alternatives.

+7  A: 

Anytime you cause the page to reflow as a result of your animation, you can have the tendency to get laggy, because the browser is trying to redraw all the affected elements so many times per second. If at all possible, try to absolutely position something, or only animate within a block level container that wont reflow. This will stop anything else on the page from moving around while you animate.

Alex Sexton