I've implemented this code successfully in order toggle between img srcs using jquery, found from a previous solution.
$('img').on({
'click': function() {
var src = ($(this).attr('src') === 'img1_on.jpg')
? 'img2_on.jpg'
: 'img1_on.jpg';
$(this).attr('src', src);
}
});
I was wondering if someone could help me to implement a fadeOut effect to transition between the img srcs, I've tried a handful of times and can't seem to wrap my head around jquery. Thank you very much for your help!