I've experienced this same error on tr's in tables. I did some investigation using IE8's script debugging tool.
First I tried using toggle:
$(classname).toggle();
This works in FF but not IE8.
I then tried this:
if($(classname).is(":visible"))//IE8 always evaluates to true.
$(classname).hide();
else
$(classname).show();
When I debugged this code, jquery always thought it was visible. So it would close it but then it would never open it back.
I then changed it to this:
var elem = $(classname)[0];
if(elem.style.display == 'none')
$(classname).show();
else
{
$(classname).hide();
}
That worked fine. jQuery's got a bug in it or maybe my html's a little screwy. Either way, this fixed my issue.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…