[jQuery] Re: Replace html class with rel attribute into an anchor

2008-09-21 Thread FrenchiINLA
what you need is attr. to get the value of an attribution use $ ('iframe').attr('href'); to set a rel attribute use $ ('iframe').attr('rel':'myrel'); On Sep 21, 10:12 am, Andrea - Aosta <[EMAIL PROTECTED]> wrote: > I need to replace an attribute inside a tag I have this code html > > Link > > An

[jQuery] Re: Replace html class with rel attribute into an anchor

2008-09-21 Thread BB
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