开发者

Shadowbox not registering on links inside a slider gallery

http://www.canadiandreamhouses.ca/listin开发者_StackOverflow社区gs/viewlisting?id=58

using

  • jquery-1.6.1
  • http://shadowbox-js.com/download.html - shadowbox 3.0.3 (downloaded 02/06/11)
  • http://pixelentity.com/previews/components/estro/index.html - Estro Slider (downloaded 02/06/11)

I am having an issue in that the images which are supposed to load up in a shadowbox, do not register and just open in a new window. The images below the moving slider gallery open fine. When I open one of those images below, the other images have been included in the gallery. It is just I can not open the gallery from the moving images.

I suspect there is some conflict between the two scripts but I cannot find it. I have tried different loading orders and methods, with no luck.


Solved the issue, I needed to add a class to the links in the gallery script (for example .slideshadow)

then, i called this code after the initial creation of shadowbox

$(function(){
    Shadowbox.setup("a.slideshadow");
});

The reason, I gather, is that the jQuery being done to the html in the slide show makes it so that the initialization of shadowbox cannot bind, or becomes unbound. The .setup function allows me to rebind it. At first I tried to bind it to every a tag, and this was no good. Every tag regardless of having a rel attribute would open in a shadowbox.

Also, waiting for window.load was too long. It would require the first image to cycle through the slide show before the shadowbox would load.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜