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

#192424
Baerspective
Participant

this is the script. i put it at bottom of the slew of images.



$(document).ready(function() { var imageLinks = $('a[href$=".png"], a[href$=".jpg"], a[href$=".gif"], a[href$=".bmp"]'); if (imageLinks.children('boxInner').length) { imageLinks.children('boxInner').each(function() { var currentTitle = $(this).attr('title'); $(this).attr('title', currentTitle + ' (click to enlarge image)'); }); imageLinks.click(function(e) { e.preventDefault(); $(this).children('boxInner').toggleClass('expanded'); }); } });