Return to Snippet

Revision: 23892
at February 16, 2010 15:35 by vagrantradio


Initial Code
$("img:not([title])").each(function() {
  		if($(this).attr("alt") != '') $(this).parent().attr("title", $(this).attr("alt"))
  		else $(this).parent().attr("title", $(this).attr("src"));
});

Initial URL

                                

Initial Description
grabs image alt or src and appends it to a title

Initial Title
JQUERY GRAB IMAGE ALT AND ADD AS A TITLE

Initial Tags
javascript, image, jquery

Initial Language
jQuery