views:

313

answers:

1

In firefox Fancybox only works on the last image (last image in the source, not the visual webpage). In IE everything works fine.

I changed ID into CLASS, but no succes yet. You can find the source here: http://www.luukratief-design.nl/dump/parallax/stack.html

please help! Bugging me for hours now.

+1  A: 

The anchors are being positioned up top.

To see what I mean, open Firebug's console and type this

$('a.big').css({ border: '6px solid red' })

Now look at the red boxes all bunched up top.

I think this is because the effect is being added to the images, and not the parent links. The images are being displayed using position: absolute, and because the anchors don't have position: relative, the anchors are collapsing like they have no content.

Since you are using JavaScript, could you do something like this?

$('a.big').click(function(event) {
    event.stopPropagation(); // in case it bubbles up the parent anchor somehow and fires twice in IE
    // trigger lightbox here..
    $(this).parent('a').click();
});

Not sure if this will work, but it might be on the right track... good luck.

alex
thanks for the answer. Since i am a javascript/jquery noob, can you please tell me where to put this snippet?I now added it in the script in the head, but does not seem to work.I seen what you mean by turning the borders on.
Luuk
I can see you have added it, and in the right place. Is there any change? You might also want to add `css({ cursor: 'hand' })` to help users know you can click the images.
alex
I'd go first with testing the events. Throw a `console.log('g\'day mate')` or similar. Test in IE using `alert()` if you want, or use a proper JavaScript debugger.
alex
wow, this is all to much for me to understand.It should not have a cursor hand since it's a href.The last image works in FF and Chrome, the others dont.The fix you gave me did not work. thanks for trying though
Luuk