【发布时间】:2014-02-06 10:12:11
【问题描述】:
我正在使用 Magnific Popup。
$(document).ready(function() {
$('.image-viewer').magnificPopup({
type: 'ajax'
});
});
这是html:
<a href="/site-media/{{ photo.image }}" class="image-viewer"><img class="fest-content-event-content-photo" width = "100%" src="/site-media/{{ photo.thumbnail2 }}" /></a>
但是,它不起作用,控制台显示错误:
Uncaught TypeError: Property '$' of object [object Object] is not a function (index):30
(anonymous function) (index):30
fire jquery.js:3048
self.fireWith jquery.js:3160
jQuery.extend.ready jquery.js:433
completed
怎么了?我没有两次加载 tje jquery.js 文件。
【问题讨论】:
-
您的相关
code在哪里?我们可以找到错误……但第一行看起来有点……错误。 -
您似乎有冲突,请尝试上面的答案并告诉我们您是否仍然遇到相同的错误
标签: javascript jquery magnific-popup