Created
April 25, 2014 13:07
-
-
Save WagnerMoreira/11288979 to your computer and use it in GitHub Desktop.
Hide Alt/Tittle from images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.hideTips = function(){ | |
return this.each(function(){ | |
var $elem = $(this) | |
var savealt = $elem.attr('alt'); | |
var savetitle = $elem.attr('title'); | |
$elem.hover(function(){ | |
$elem.removeAttr('title').removeAttr('alt'); | |
},function(){ | |
$elem.attr({title:savetitle,alt:savealt}); | |
}); | |
}); | |
}; | |
})(jQuery); | |
$(function(){ | |
$('.img').hideTips(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment