Click() works in IE but not Firefox

前端 未结 5 1629
小鲜肉
小鲜肉 2020-12-05 12:08

I have code which is trivial but only works in IE not Firefox.

$(document).ready(function(){
    $(\'li#first\').click();
});

I have also t

5条回答
  •  悲哀的现实
    2020-12-05 13:05

    Your code should work in Firefox. Here's a full snippet that proves it:

    
    
    
    
    
    
    
    
    
    
    • First item
    • Second item
    • Third item

提交回复
热议问题