无法使弹出式窗口正常工作,两个javascript错误 [英] Can't get magnific popup to work, two javascript errors

查看:107
本文介绍了无法使弹出式窗口正常工作,两个javascript错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作灯箱画廊,并使用了示例源代码.

I am trying to make a lightbox gallery and have used the example source code.

这是我阅读过的文档: http://dimsemenov.com/plugins/magnific-popup/documentation.html

Here is the documentation I read over: http://dimsemenov.com/plugins/magnific-popup/documentation.html

Uncaught TypeError: undefined is not a function

Uncaught ReferenceError: $ is not defined 

我不确定错误是什么意思或如何处理.

在我观看的视频教程中,他们说了有关jquery冲突是潜在问题的一些事情.在网站的其他页面上,我使用了Kwicks滑动菜单(也使用了jquery).这是我唯一能想到的.

In a video tutorial I watched, they said something about a jquery conflict being a potential problem. On a different page of the website, I used a Kwicks sliding menu (which also used jquery). That's the only thing I can think of.

如果您能给我任何帮助,我将不胜感激!

I would really appreciate any help you would be able to give me!

谢谢!没有更多的错误,但是现在我需要使用放大光标来使图像上的悬停工作.

我已经完成了悬停工作,现在我需要进行放大光标的工作.我在页面上附加了光标悬停时的光标所在页面.

示例: http://dimsemenov.com/plugins/magnific-popup/

我已经弄清楚了缩放光标!感谢您提供的所有帮助!

推荐答案

插件的文档 宏弹出式窗口 ,您正在使用建议-

The documentation of the plugin Magnific popup you are using suggests -

包含文件

<!-- jQuery 1.7.2+ or Zepto.js 1.0+ -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> 

<!-- Magnific Popup core JS file -->
<script src="magnific-popup/jquery.magnific-popup.js"></script>

记住:您需要包括jQuery文件引用,插件才能工作;而不是每个jQuery插件.并以指定的顺序.这是$ not definedundefined in not a function背后的唯一原因.

Remember : You need to include jQuery file reference, for the plugin to work; rather every jQuery plugin. And in the specified order. This is the sole reason behind $ not defined and undefined in not a function.

这篇关于无法使弹出式窗口正常工作,两个javascript错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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