It would be much easier if you just create a sub class with the CSS style of #header-yellow and add it to your DIV element. And to be honest I doubt that you can change the ID attribute
Like this: $("#header").addClass('span-24-2'); On Thu, Jun 19, 2008 at 6:34 PM, Daniel Amselem <[EMAIL PROTECTED]> wrote: > > > Hi!, I'm new with jQuery, and I tried to modify the id attribute of a div > without success. I need to do that because I want to change some CSS > properties of that div, and I already have the code. So, how can I change > something like this: > > <div id="header-blue" class="span-24"> > > into this: > > <div id="header-yellow" class="span-24"> > > ? > > I've already tried with $("#header-blue").attr("id","header-yellow); > without > success. Any ideas? > > Thanks in advance. > -- > View this message in context: > http://www.nabble.com/Modify-ID-attribute-tp18010518s27240p18010518.html > Sent from the jQuery General Discussion mailing list archive at Nabble.com. > > -- Isaak Malik Web Developer