Joomla 2.5 Jquery Cannot call method of null

前端 未结 1 1171
失恋的感觉
失恋的感觉 2021-01-17 04:11

Hi guys I am using Joomla 2.5 with Jquery and I got this strange error in my chrome console:

\"Uncaught TypeError: Cannot call method \'slideUp\' of null \"         


        
相关标签:
1条回答
  • 2021-01-17 05:00

    Most probably your jquery code is conflicting with mootools. Try this using

    jQuery.noConflict();

    Your code will be like below-

    var $j = jQuery.noConflict();
    $j(document).ready(function(){
    
        var slider = document.getElementById("login-form");
    
        alert (slider);
    
        $j("#login-form").slideUp(100);
    
    });
    
    0 讨论(0)
提交回复
热议问题