Sunday, February 12, 2012

Fancybox Thumbnail Opacity


This may be obvious, but I can't find the answer anywhere after hours of searching. I just need the syntax to adjust the initial opacity of a Fancybox gallery. Not the overlay or anything like that - just the initial thumbnail opacity. I've tried changing every setting I can find in the fancybox js and tried overriding opacity in the css, but no matter what I do, they stay the same. Hmmm.



I have no weird code, just a simple $("a.gallery").fancybox() call on a thumbnail image. I just want the opacity to be a bit more opaque!

2 comments:

  1. Use the Chrome or IE developer tools, or Firebug in Firefox to look at the css applied to your thumbnails. You should be able to find out fairly quickly what is causing the problem. I wouldn't recommend this on a large project, but you can also change the CSS with jQuery on load using:

    $("a.gallery").css("opacity", "1");


    Again, I wouldn't use that - it's better to find the original problem. If you have a link, we could take a look at it and give you other suggestions.

    ReplyDelete
  2. I don't think it would be anything to do with the Fancybox JS or CSS. The image thumbnails are typically just part of your page, and they simply launch Fancybox.

    Unless I am mistaken, that would mean you would set the opacity in your CSS based on your HTML.

    ReplyDelete