jQuery .toggle() not working with TRs in IE

前端 未结 13 2548
暗喜
暗喜 2020-12-08 20:43

I am using jQuery\'s toggle() to show/hide table rows. It works fine in FireFox but does not work in IE 8.

.show()/.hide() work fine though

13条回答
  •  误落风尘
    2020-12-08 21:08

    Upgrading to jQuery 1.4 fixes this, whilst I'm at it though, the only "fix" on this page which worked for me was Dough boy's answer:

    $(document).ready(function() {  
      $(".readOnlyRow").hide();  
      $("#readOnlyRowsToggle").click(function() {  
        $(".readOnlyRow").toggle($('.readOnlyRow').css('display') == 'none');  
      });  
    });
    

提交回复
热议问题