我快要疯了 - 我无法让我的 Jquery 灯箱工作...如果有人能快速浏览一下那就太好了!
网站是 http://www.layersoflondon.org/index-with-jquery.html
我认为问题在于标题中的 Google 地图 Javascript 和 Jquery lightbox 存在冲突。例如,我通过在 Google 地图中的图像链接上放置 onclick 事件来使 Slimbox 工作:
camdenSuperstoreContent.innerHTML = "
";
问题是 Slimbox 使用 Mootools,而我想使用 Jquery 来处理其他一些东西......
是有没有办法用灯箱做到这一点?
感谢您的任何建议。
非常感谢。
I'm going crazy here - I can't get my Jquery lightbox to work... Would be great if someone could have a quick look!
Site is http://www.layersoflondon.org/index-with-jquery.html
I think the problem is that there is a conflict with the Google Maps Javascript in the header and the Jquery lightbox. For example I got Slimbox working by putting an onclick event on the image links in the Google map:
camdenSuperstoreContent.innerHTML = "<a rel=\"lightbox\" href=\"images/project-images/camden-superstore.jpg\" onclick=\"Slimbox.open('images/project-images/camden-superstore.jpg', 'Camden Superstores');return false\"><img src=\"images/project-images/camden-superstore-thumb-no-border.jpg\" /></a>";
The problem is that Slimbox uses Mootools and I want to use Jquery for some other stuff...
Is there a way to do this with the lightbox?
Grateful for any suggestions.
Thank you very much.
发布评论
评论(1)
在 javascript 控制台中,当我单击任何图像时,会出现一条消息“Uncaught ReferenceError:Slimbox 未定义”。您在标头中注释掉了 Slimbox 库,而是使用 jquery.lightbox。但您的图像仍然包含以下内容:
删除对 Slimbox 的所有引用。另外,您应该仅在页面上出现图像后(即呈现 Google 地图后)调用以下函数:
In javascript console there is a message "Uncaught ReferenceError: Slimbox is not defined" when I click on any image. You commented out Slimbox library in header and instead use jquery.lightbox. But your images still contains this:
Remove all references to Slimbox. Also you should call following function only after images is present on the page, i.e. after Google map is rendered: