jQuery + WordPress: $ is not defined

前端 未结 2 652
梦如初夏
梦如初夏 2021-01-25 23:11

The following code is having some problem with the jQuery.



        
2条回答
  •  佛祖请我去吃肉
    2021-01-25 23:40

    Use the word jQuery instead of $ and pass it a $ reference

    jQuery(function($) {
        // you can use $ here
        $(window).load(function() {
            ..
        });
    });
    

提交回复
热议问题