Hmm.. maybe you should read the documentation of jQuery.. Do you mean something like this?
$(".iframe").attr({ "rel": "highslide-iframe", "href": "my-new- url.html" }).removeClass("iframe"); http://docs.jquery.com/Attributes/attr On 21 Sep., 19:12, Andrea - Aosta <[EMAIL PROTECTED]> wrote: > 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