I’ll preface this by saying that I’m a total jquery newbie. That said, I’d like to use jquery to insert a ‘rel’ attribute with a value of “shadowbox” into the <a> tag in the following bit of code…
<div class="bibImage" title="">
<a href="" target="_parent"><img src="" border="0" alt=""></a>
</div>
This is system-generated html, so I don’t have the option of adding ‘class’ or ‘id’ attributes which would help jquery target the element. The div is uniquely identified, so I’m guessing that it’s possible to specify the <a> as a child(?); but I’m really not sure how. Nor do I understand which method can be used to actually insert the ‘rel’ attribute + value.
Thanks in advance for any insight and guidance.
1 Answer