Home › Forums › JavaScript › need to display an image from gallery to open in another div after click › Reply To: need to display an image from gallery to open in another div after click
October 23, 2015 at 1:06 am
#210078
Shikkediel
Participant
Well, it shouldn’t be too difficult and I’d write up some code but I’d have to know what elements to base it on…
$(function() {
$('.element').click(function() {
var path = this.src;
if (path) $('#mainelement').attr('src', path);
});
});