views:

228

answers:

1

Hi,

I have a table in which there will be thousands of records(div elements). Each div is click able and when I click on each record, a div which is hidden under the clicked div will be shown using slideToggle.

Since the number of records are very high the effect of slideToggle is not the desired one. It just shows up the div instead of sliding.

I have the following event handler code

$("div.opendiv").click(function(){
    var openelem = $(this).next();
    openelem.slideToggle();     
});

I don't want to divide these records into pages.

Is there anything I can do so that the slideToggle effect will be smooth?

Thanks

+2  A: 

have you tried set a duration to de slideToggle efect? like:

$("div.opendiv").click(function(){
    var openelem = $(this).next();
    openelem.slideToggle(1000);     
});
TeKapa
still the effect is not so smooth.
rahul
`slideToggle()` has a default time anyway.
Kobi
i know that it has a default time, mas i think the ploblem is that with so much html inside your div, it may need more time to open it smothly, try to increase it a bit more
TeKapa
If anything, you can do less FPS, but I don't think jQuery supports that.
Kobi