Reputation: 2387
I have the following set up on my website for each of my portfolio items: http://jsfiddle.net/WQpLd/
(I couldn't get Fancybox to work in the example link above.)
A live version can be viewed on my website here.
The problem is that when I hover over the boxes and click on the 'view screenshot' link, the screenshot gets shown via Fancybox — which is fine, but when I close the screenshot, sometimes the boxes get left with a dark overlay. Only when I hover over the 'overlayed' box with my mouse will the box get back to 'normal'.
To further illustrate this, I've shot a quick video here.
How can I fix this to make the dark overlay not appear at all after I've closed the Fancybox screenshot?
Upvotes: 2
Views: 2957
Reputation: 7100
I had the same problem using fancybox 2.1.0 and jquery 1.6.2, while loading a gallery dynamically.
I removed the fade out effect for closing, and it fixed it. The code I used is:
$.fancybox.open(images, {
closeEffect: 'none'
});
Upvotes: 0
Reputation: 361
I had the same issue.
Use the latest jquery library from Google, e.g.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>.
Upvotes: 2
Reputation: 8765
My first suggestion would be to use the onClosed
option to define a callback and makes the overlay disappear once more just to be safe. The mouseout callback (2nd parameter) of your jQuery.hover()
call could separated out into a separate function so you don't repeat your code.
Upvotes: 0