I do know how to use opacity in CSS to make an image darker or lighter on mouseover, but this looks like it's using javascript and it looks much slicker. I'd really like to have darkened images that light up on mouseover, but with that fade effect instead of just instantly changing like the opacity setting does. Any sugestions? Thanks!

Pullo
—
2013-04-03T20:06:33Z —
#2

Hi,

The effect in is being created with the MooTools library.

Here is a stand alone example that you can have a look at and which is hopefully a little easier to understand:

The important parts are the CSS inside the <head> section of the document, as well as the JavaScript include (MooTools library) and the JavaScript before the closing body tag (responsible for the fade in / out effect).

You could also achieve such an effect using jQuery, something like this:

First of all, thanks so much for the detailed response! Now...for the code itself, I tried out the jquery code you gave and it works perfectly! Unfortunately, now the gallery thumbnails, when clicked, are jumping straight to filename.jpg instead of popping up in the lightbox format. I'm assuming that's because of some conflict with the js code, but I'm not experienced enough with javascript to figure out exactly what.

Pullo
—
2013-04-04T10:26:36Z —
#5

Hi,

No problem.Staying with the jQuery solution, I have added LightBox functionality for you.

You are absolutely amazing. Everything is working perfectly now. I can't thank you enough for your help with this! The lightbox looks beautiful and the thumbnails are exactly as I wanted them to be. I have just one last question and then I promise I'm done...is there an easy way to hide/remove the image counter? I like that the title shows when the lightbox pops up but I was hoping to remove the "Image # of #" line. Any quick fixes for that? If not, never mind, it's not that important. I really appreciate all of your help with getting this set up.

Pullo
—
2013-04-04T18:34:47Z —
#7

Hi,

The only way to remove the "Image # of #" line (that I am aware of), is to hack the plugin code.It would be possible to just comment out the lines responsible, but that seemed a little hacky.Therefore, I modified things a little, so that if you set the following global variable in your JavaScript code, before lightbox.js is included, the offending line will not display:

var hideImageCount = true;

If you do not set the variable, then the "Image # of #" will display as normal.

Here's [an updated demo and here's a link to [URL="http://hibbard.eu/blog/pages/lightbox_hover_demo_2/files2.zip"]download the files](http://hibbard.eu/blog/pages/lightbox_hover_demo_2/).

Oh, and BTW, in my previous example I had rel="lightbox[plants]" on the <a> tag.

This is what LightBox uses to group images together.If you turn this into rel="lightbox", then the images will all display individually without the "Image # of #" text, but you will not be able to navigate between them.In my latest example I changed "plants" to "cats".