leanModal不是函数 [英] leanModal not a function

查看:94
本文介绍了leanModal不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望您能帮助我解决此问题.我在我的网站上使用了一些jQuery脚本(一个是leanModal,我过去已经使用过几次,没有任何问题).我正在使用WP的网站工作正常,直到几个小时前该模式停止工作.查看错误控制台,它指出:

Hopefully you can help me clear this up. I'm using a few jQuery scripts on my site (one being leanModal, which I've used several times in the past without any problems). The site I'm working on (using WP) was working fine, until a few hours ago the modal stopped working. Looking at the error console it states:

$ is not a function
$("a#go").leanModal();

$ is not a function
$(function() {

两者都与leanModal有关.为什么突然会出现这种错误的任何想法?

Both relate to leanModal. Any ideas why suddenly such an error would occur?

参考站点在此处( http://richgc.com/freelance/industry/)然后点击信息"即可触发该模式.

Site for reference is here (http://richgc.com/freelance/industry/) and the modal is fired by clicking 'Information'.

推荐答案

似乎您以某种方式覆盖了$.

It looks like you override the $ in some way.

$undefined
jQuery返回一个jQuery对象. (function (a,b){return new e.fn.init(a,b,h)})

$ is undefined
jQuery return a jQuery object. (function (a,b){return new e.fn.init(a,b,h)})

@Rocket :

您使用jQuery.noConflict(); $杂音释放到其先前状态(undefined)

Which free the $ varibale to it's previous state (undefined)

阅读noConflict 文档:

说明:放弃jQuery对$变量的控制

Description: Relinquish jQuery's control of the $ variable

这篇关于leanModal不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆