Currently, I am utilizing a jQuery and CSS3 photo gallery found on this website. My goal is to allow the images to enlarge when clicked, however, the method provided by the author isn't very clear to me, as I'm not an expert in jQuery.
I attempted to create a separate script that would adjust the width and height of the image, but it seems like the existing jQuery or CSS may be overriding my changes. Here is a snippet of what I tried:
var size = false;
function enlarge(){
if (size == false){
document.getElementById("photo1").style.width = "100%";
document.getElementById("photo1").style.height = "100%";
size = true;
}
else{
document.getElementById('photo1').width = '134px';
document.getElementById('photo1').height = '134px';
size = false;
}
If you have any suggestions on how I could successfully achieve this enlargement effect, please share your thoughts.