IE8, Table Rows, and the jQuery “toggle” Method
I was recently on a project that required collapse/expand functionality. Upon implementation, I ran into a problem where IE6, IE7, and Firefox were working as expected, but IE8 was not. After spending more time on the issue that I care to admit, I found that IE8 has an issue with table rows (<tr>) and the jQuery toggle method. I was able to get around the issue by substitute this line of code:
$(tr).next().toggle();
with
$(tr).next().toggle($(tr).next().css(‘display’) == ‘none’);
Categories: Uncategorized
Recent Comments