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

前端 未结 14 1863
猫巷女王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:32

    You can use both jQuery and $ in below snippet. it worked for me

    jQuery( document ).ready(function( $ ) {
      // jQuery(document)
      // $(document)
    });
    

提交回复
热议问题