I need to replace an attribute inside a tag <a... I have this code html
<a href="url.html" class="iframe" >Link</a> And, for all link with iframe class, i need to have <a href="iframe.html" rel="myrel" > Link </a> I have try with $(".iframe").append("rel='highslide-iframe'"); but this append outside the <a... I think this is better: $(".iframe").replaceWith("rel='highslide-iframe'"); but how to set a replace saving the url target? Thank you