TypeError is Null?

前端 未结 4 547
我在风中等你
我在风中等你 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:17

    I have several scripts running on this page and evidently one script was conflicting with another. To solve my issue I added jQuery.noConflict();

    var $j = jQuery.noConflict();
    $j(function() {
      $j("#close-gallery-nav-button").click(function() {
        $j('#gallery-nav-button').addClass('animated fadeOutRightBig');
       });
    });
    

提交回复
热议问题