I am not sure what i am telling is right or not, but try
$(this).removeClass().addClass("collapsible").addClass("collapsed"); If you think this couldn't be the problem ignore this message. -GTG On 7/25/07, Mario Moura <[EMAIL PROTECTED]> wrote:
yes, But still not working. Strange behavior. I guess or I need study more. :) $(document).ready(function(){ $(".collapsible .collapsed").click(function(){ $(this).removeClass().addClass ("collapsibleopen"); }); $(".collapsibleopen").click(function(){ $(this).removeClass().addClass("collapsible collapsed"); }); }); thanks Regards Mario 2007/7/25, Eric C <[EMAIL PROTECTED]>: > > > shouldn't your line: > $("collapsibleopen").click(function(){ > be > $(".collapsibleopen").click(function(){ > > ? > On Jul 25, 3:28 pm, "Mario Moura" < [EMAIL PROTECTED]> wrote: > > Hi Folks > > > > I am trying switch between two class > > > > Is it possible? > > > > $(document).ready(function(){ > > > > $(".collapsible .collapsed").click(function(){ > > $(this).removeClass().addClass("collapsibleopen"); > > }); > > > > $("collapsibleopen").click(function(){ > > $(this).removeClass().addClass("collapsible collapsed"); > > }); > > > > }); > > > > My first switch works but when I click in collapsibleopen (change from > the > > previous click) didnt change. > > > > I have many .collapsible .collapsed classes so I cant change all at > the same > > time. Ideas? > > > > Regards > > > > -- > > Mário > > -- Mário Alberto Chaves Moura [EMAIL PROTECTED] 31-9157-6000