Performance degradation with "toggle()"
I was using jQuery v1.2 to show/hide 1000+ items (simple paragraphs) using the 'toggle' method (simple hide/show, no animation). When pointing to a newer version of jQuery (such as 1.3 or 1.4) I start to notice the method taking
much longer to execute.
In Firefox 3.6.3, jQuery v1.2 would take about half a second to execute. When using v1.3 or 1.4 it takes around 4 seconds.
In IE7, jQuery v1.2 would, again, take about half a second. When using v1.3 it takes about 1 second to hide, and about 5 seconds to show.
I've put together a work-around which uses the 'each' method and manually changes the 'display' CSS property, and that seems to run much faster. But I'm concerned by the huge performance hit when using 'toggle'. Should I stop using 'toggle' in all my applications? That seems inconvenient. I attached an example.