Dynamicly Inject img alt attribute jQuery

Posted by Brock on Stack Overflow See other posts from Stack Overflow or by Brock
Published on 2012-06-28T15:14:11Z Indexed on 2012/06/28 15:15 UTC
Read the original article Hit count: 343

Filed under:
|
|

I need some help, and before we get going, I know it is probably not best practice, but I am doing some maintenance to an existing site and need to accomplish the following for a fix.

<a rel="lightbox" href="site.com" title="a generated title"><img src="site.com/img" class="post-image" alt="a long description"/></a>

Okay, so I am trying to figure out how to use jQuery or any other method to take the "alt" attribute from my image, and dynamically overwrite the "title" attribute of my "a" tag.

Any help would be awesome, I am kinda lost at this juncture.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about img