TypeError is Null?

前端 未结 4 549
我在风中等你
我在风中等你 2021-01-12 01:29

This is an error in Firebug I keep seeing.

TypeError: $(\"#gallery-nav-button\") is null
 [Break On This Error]  
$(\'#gallery-nav-button\').addClass(\'anima         


        
4条回答
  •  执笔经年
    2021-01-12 02:15

    I agree with the advice given above, relating to the onload event. https://stackoverflow.com/a/18470043/2115934

    A more simple solution (though not necessarily a better one) is to put your script tag just before the closing body tag of the document.

    
    
    
    
    Document
    
    
    

提交回复
热议问题