Image change
-
Hi all,
I have a code question for you. I am lost with the answer so I hope someone can direct me.
Basically I have a wordpress site under development and I have created two custom image sizes within my functions file.
I am calling these images and a row of thumbnails and then above them is a larger box which I need a larger version of the thumbnail to show once the thumbnail is clicked.
I have this working at the moment by forcing a hard crop and changing the file names by the size WordPress adds to the end of the image name:-
$('#thumbs img').live('click', function(){ $('#largeImage').attr('src',$(this).attr('src').replace('46x57','199x319')); $('#largeImageWindow').attr('src',$(this).attr('src').replace('46x57','398x500')); $('#description').html($(this).attr('alt')); });
However I don’t want the image to be cropped! thus the height of the image is changeable when wordpress saves it.
How can I get the function to work with variable height images?
Thank you kind people,
- The topic ‘Image change’ is closed to new replies.