/ Published in: jQuery
![](/img/icon_sav.png?v3)
grabs image alt or src and appends it to a title
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$("img:not([title])").each(function() { if($(this).attr("alt") != '') $(this).parent().attr("title", $(this).attr("alt")) else $(this).parent().attr("title", $(this).attr("src")); });
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)