html - Hide img alt tag on image hover in Javascript? -
i want hide browser popup shows when hover images have alt
attribute.
i need attribute still on html pages, it's indexed google, don't want users see when hover image.
does know how this?
thank you!
it's quick , dirty, rid of alt attributes on images.
[].foreach.call(document.images, function(img) { img.setattribute('alt', ''); });
as scott pointed out, alt attribute isn't 1 responsible showing text on hover. can change script remove either.
[].foreach.call(document.images, function(img) { img.title = ''; // property style syntax works });
Comments
Post a Comment