jQuery Set Image TITLE from ALT Tag

This is a super-useful jQuery Script that gets the Image Title from the ALT Tag if no title is set with a fall-back to the image src. jQuery(document).ready(function($) { $(“img:not([title])”).each(function() { if($(this).attr(“alt”) != ”) $(this).parent().attr(“title”, $(this).attr(“alt”)); else $(this).parent().attr(“title”, $(this).attr(“src”)); }); }); view rawjQuery Set Image TITLE from ALT Tag hosted with ❤ by GitHub Benefits of getting the Image Title …