This content originally appeared on foobartel.com :: Stream and was authored by foobartel.com :: Stream
The other day I had to work on an order form which I needed to hide and show groups of rows depending on group selection. The first approach was to just use jQuery's show/hide functions. The table had about 300 rows of data and it turned out that the showing and hiding at about 3 seconds per click was way too slow.
I searched for known performance problems with show/hide and came across a very helpful article on this:
Now you see me… show/hide performance
After reading through the article, I swapped the show/hide function in favour of .css({'display':'none'}) & .css({'display':'table-row'});
, which led to a drastically improved performance, showing and hiding of rows this way was almost instant.
It's always worth considering and trying out different approaches, which might result in much better performance and an improved user experience.
This content originally appeared on foobartel.com :: Stream and was authored by foobartel.com :: Stream
foobartel.com :: Stream | Sciencx (2012-12-13T23:00:00+00:00) jQuery Performance Issues With Show/Hide. Retrieved from https://www.scien.cx/2012/12/13/jquery-performance-issues-with-show-hide/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.