Can#39;t get magnific popup to work, two javascript errors(无法让 magnific popup 工作,两个 javascript 错误)
问题描述
我正在尝试制作一个灯箱画廊并使用了示例源代码.
I am trying to make a lightbox gallery and have used the example source code.
这是我阅读的文档: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/
我找到了缩放光标!感谢所有的帮助!
推荐答案
插件的文档 Magnific popup 您正在使用的建议 -
The documentation of the plugin Magnific popup you are using suggests -
包括文件
<!-- jQuery 1.7.2+ or Zepto.js 1.0+ -->
<script src="Ly9hamF4Lmdvb2dsZWFwaXMuY29tL2FqYXgvbGlicy9qcXVlcnkvMS45LjEvanF1ZXJ5Lm1pbi5qcw=="></script>
<!-- Magnific Popup core JS file -->
<script src="bWFnbmlmaWMtcG9wdXAvanF1ZXJ5Lm1hZ25pZmljLXBvcHVwLmpz"></script>
记住:您需要包含 jQuery 文件引用,插件才能工作;而是每个 jQuery 插件.并按照指定的顺序.这是 $ not defined
和 undefined 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
.
这篇关于无法让 magnific popup 工作,两个 javascript 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:无法让 magnific popup 工作,两个 javascript 错误


- addEventListener 在 IE 11 中不起作用 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01