I have a table with 5000 rows. In each row I have an html element. myElementList is the list of those elements. Now I need to select all the tr’s of these elements. I am using the following code.
myElementList.closest('tr');
This work great in FF. But when I run the same in IE 8. The browser hangs out and a popup messgae appears that propmt for to stop the script.
Any suggestion why I am seeing this behaviour or thier is any alternative.
Edit:
The behaviour remains same when I use parents()
myElementList.parents('tr');
To get what you wish fairly snappy (the closest parent tr to every checked checkbox) you’d could do something like this:
It isn’t pretty, but i can’t think of a faster way. (it should beat jQuery by a wide margin)