tags:

views:

484

answers:

1

The following jQuery code works fine in FireFox but not in IE.

The loop executes the expected number of times(verified by counting alerts) but the hidden classes do not become visible.

 $("a.riskInformationButton").bind("click", function(e){ 
     var toggler = $(this).parent().parent().next();         
     while(!toggler.hasClass("spacerRow")){   
        alert("Hey!");             
        toggler = toggler.toggleClass("hidden").toggleClass("visible").next();         
    }
});

Any assistance with this issue would be much appreciated

Thanks,

Shawn

+1  A: 

Are they table rows? jQuery has a bug about table-rows and toggle in IE8. Here's a workaround.

Tom Ritter
yes they are table rows. However, i'm not using IE8
ErnieStings
@Tom - great links
Russ Cam