问题描述
WordPress在主题、插件开发中,如果我们直接使用 ` $(‘#ID’) ` 这种写法就会报错:
Uncaught ReferenceError: jQuery is not defined
TypeError: $ is not a function
解决方法
jQuery(function($) { // use $ });
WordPress在主题、插件开发中,如果我们直接使用 ` $(‘#ID’) ` 这种写法就会报错:
Uncaught ReferenceError: jQuery is not defined
TypeError: $ is not a function
jQuery(function($) { // use $ });
链接到文章: https://uziwp.com/14850.html
Backup Bootstrap cache Chrome Cloud Dashboard Device Disk Docker file Gutenberg古登堡 IIS Javascript jQuery Linux Mariadb Media MySQL Network Nginx OneThink Pages PHP PHP8 Posts Qcloud腾讯云 Redis Rsync SEO Siteground system Tags Theme ThinkPHP Ubuntu VPS Vultr Windows WooCommerce WordPress WordPress Plugins WordPress插件 主题 搬瓦工BWH 编辑器
评论已关闭