Saturday, June 11, 2011

jQuery Image RollOver


$(function() {
$('img[data-hover]').hover(function() {
$(this).attr('tmp', $(this).attr('src')).attr('src', $(this).attr('data-hover')).attr('data-hover', $(this).attr('tmp')).removeAttr('tmp');
}).each(function() {
$('').attr('src', $(this).attr('data-hover'));
});;
});



No comments:

Post a Comment