I want to get the title attr from an image and make it the title attr for that image’s link. I don’t have access the actual html to alter it by hand, so I was thinking I could use js to add a title tag my links.
I’ve started with
var $title = $("#gallery a img").attr("title");
But this is setting the title for all the a tags to ‘piece number 3′, the title from the first image.