Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript thumbnails won't enlarge in same window Reply To: thumbnails won't enlarge in same window

#192425
Senff
Participant

You’re right, my mistake.

First thing to do, make sure you only load ONE jQuery library.
Second, make sure that your script comes AFTER loading your jQuery library.

Maybe that helps.

It’s also possible that all the extensions in your code are all caps:

<a href="gallery/amberhall.JPG" alt="garage"><img src="gallery/amberhall.JPG" alt="garage"></a>

But in your script they’re lower caps:

var imageLinks = $('a[href$=".png"], a[href$=".jpg"], a[href$=".gif"], a[href$=".bmp"]');

So try to change it in your script to this:

var imageLinks = $('a[href$=".PNG"], a[href$=".JPG"], a[href$=".GIF"], a[href$=".BMP"]');