1

My testsite 1: where it doesn't work

My testsite 2: where everything is fine (gallery can be seen if you click the list-items in the content)

My script as I use it for testsite 1 (nothing fancy ;)):

jQuery(document).ready(function() { 
    jQuery(".fancybox").fancybox();
    jQuery.fancybox.next('right'); 
    jQuery.fancybox.prev('left');   
});

In Firefox I can't change between the images of the gallery with my mouse. If I click a thumbnail the fancybox opens, but if I click the arrow to get the next image nothing happens. But if I use the enter key I can move through the gallery. If I use Opera, IE9, Chrome or Safari I can use the mouse, but it's a bit "shaky". I have to hit exactly the span with the arrow and fancybox don't use the horizontal sliding but the default sliding effect.

My first guess was it could be some interference with one of the other scripts on the site, but even if I remove all other scripts nothing changes. My second guess was it could be an influence from WP-Minify, but everything is the same wthout minified javascript. I also tried to strip my script to the bone and removed jQuery.fancybox.next('right'); jQuery.fancybox.prev('left'); ... without any changing.

Could anybody please tell what I'm doing wrong? Thanks

P.S. I don't get any console errors.

4

1 回答 1

0

我知道了。我的 css 文件中有一些东西导致了这种奇怪的行为。我a:active{ position: relative; top: 1px; }在每个 css 文件中都有一个全局文件,而 fancybox 似乎不喜欢这个;)。

于 2012-07-20T07:27:40.453 回答