$(element).hover(
function () { $(this).data('original', $(this).attr('src')).attr('src', newsrc),
function () { $(this).attr('src', $(this).data('original')
);
I don’t know how you define a new image source, but that is pretty much the way to go. In addition, you probably want to use each () on each image and inside, define "newsrc".
source
share