TypeError: 'undefined' is not a function (evaluating '$(document)')

前端 未结 14 1814
猫巷女王i
猫巷女王i 2020-11-22 07:13
  1. I\'m using a WordPress site.
  2. I\'m including this script in the header.

When the script loads, I get this error:

TypeErro

14条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 07:59

    Use jQuery's noConflict. It did wonders for me

    var example=jQuery.noConflict();
    example(function(){
    example('div#rift_connect').click(function(){
        example('span#resultado').text("Hello, dude!");
        });
    });
    

    That is, assuming you included jQuery on your HTML

    
    

提交回复
热议问题