我正在尝试解决问题,.I无法加载此脚本http://orangeplacehotel.com/superbudget/ems-policy。这段代码有什么问题吗?我试着设置警报,它工作正常,但我仍然看不到插件加载到网站上。请帮帮我..谢谢,
$(function() {
$('#nanoGallery1').nanoGallery({
kind:'flickr',
userID:'129251189@N05',
touchAutoOpenDelay: -1,
breadcrumbAutoHideTopLevel: true,
maxWidth: 948,
imageTransition : 'slide',
thumbnailWidth: 200,
thumbnailHeight: 126,
thumbnailHoverEffect: 'scaleLabelOverImage,borderDarker',
i18n: {
thumbnailImageDescription: 'view photo',
thumbnailAlbumDescription: 'open album'
},
thumbnailLabel: {
display: true,
position: 'overImageOnMiddle',
hideIcons: true, align: 'center'
},
thumbnailLazyLoad: true
});
});
alert("test");<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
发布于 2015-01-07 19:09:11
错误是"NanoGallery不是一个函数“我认为你应该在运行你的代码之前检查你的插件( nanoGaller()的定义)是否包含在页面中
下面是运行良好的代码,这不是一个解决方案,但可能会给你一些想法
首先包含jquery库,然后
$.prototype.nanoGallery = function(){
console.log(arguments);
}
$(function() {
$('#nanoGallery1').nanoGallery({
kind:'flickr',
userID:'129251189@N05',
touchAutoOpenDelay: -1,
breadcrumbAutoHideTopLevel: true,
maxWidth: 948,
imageTransition : 'slide',
thumbnailWidth: 200,
thumbnailHeight: 126,
thumbnailHoverEffect: 'scaleLabelOverImage,borderDarker',
i18n: {
thumbnailImageDescription: 'view photo',
thumbnailAlbumDescription: 'open album'
},
thumbnailLabel: {
display: true,
position: 'overImageOnMiddle',
hideIcons: true, align: 'center'
},
thumbnailLazyLoad: true
});
});
alert("test");https://stackoverflow.com/questions/27816824
复制相似问题