I am doing a custom gallery where when you click a div it changes the src of the div, so I do:
function change2dd1() {
$("div.videoSel > img").attr("class", "joanamid");
$("div.videoSel > img").attr('src', $('.videoSel2 > img').attr('src'));
}
I also try to change the class of the img, so that when I click on it, I get a full screen version, which I use:
$('.Fullscreen').css('height', $(document).outerWidth() + 'px');
//for when you click on an image
$('.joanamid').click(function () {
var src = $('.joanafull').attr('src'); //get the source attribute of the clicked image
$('.Fullscreen img').attr('src', src); //assign it to the tag for your fullscreen div
$('.Fullscreen').fadeIn();
if(imgChecker.height() > imgChecker.width()) {
$(".Fullscreen img").css({"display":"block", "margin":"5% auto","z-index":"20","top":"0", "width":"30%",
"height":"40%"});
}
});
The problem is that the change class is not working at all, it keeps the same class that the div first possesses. Any suggestions?