在我的网站上实施lightgallery时遇到问题.我已经搜索了堆栈溢出并阅读了lightgallery页面上的文档,无法弄清楚问题是什么!这是我的网站的代码:
我在javascript控制台中收到此错误:
lightgallery.js:401 Uncaught TypeError: Cannot read property ‘match’ of undefined
当我在javascript中遵循代码路径时,我找到了youtube源代码
东西.因为我没有尝试用这个和公正的方式实现视频
现在的图片,我取消注释视频的东西,并得到新的错误!:
lightgallery.js:1271 Uncaught SyntaxError: Unexpected token )
lg-thumbnail.min.js:4 Uncaught TypeError: Cannot read property ‘modules’ of undefined(anonymous function) @
lg-thumbnail.min.js:4(anonymous function) @ lg-thumbnail.min.js:4
lg-fullscreen.min.js:4 Uncaught TypeError: Cannot read property ‘modules’ of undefined(anonymous function) @
lg-fullscreen.min.js:4(anonymous function) @ lg-fullscreen.min.js:4
portfolio.html:124 Uncaught TypeError: $(…).lightGallery is not a function(anonymous function) @ portfolio.html:124j @
jquery.js:3099k.fireWith @ jquery.js:3211n.extend.ready @
jquery.js:3417I @ jquery.js:3433
我真的很喜欢使用lightgallery,但是在过去的两天里,这是一场噩梦,试图让它发挥作用,任何帮助都将非常感激!
您正在使用错误的HTML标记.您必须遵循docs中指定的以下任何标记.
方法:1)
HTML
使用Javascript
$("#lightgallery").lightGallery();
方法:2)
HTML
使用Javascript
$("#lightgallery").lightGallery({
selector: '.item'
});
(编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!