[jQuery] Re: Toggle Classes

2009-10-07 Thread Charlie
it's your use of next() that's incorrect. You have 2 cases of HTML now so explanation a little trickier. Original html .arrow was a descendant not a sibling, next() looks for siblings so in 1st case changing to find() or children() would work Second case HTML, next looks down the DOM and arro

[jQuery] Re: Toggle Classes

2009-10-07 Thread captaincarp
Have you tried .addClass() and .removeClass() and setting up a different action for each, thus simulating toggle? craigeves wrote: > > > Hi > > Can anyone help? I'm trying to toggle a class on the span .arrow when > you click .msg_head. I have several classes of .arrow on the page and > on

[jQuery] Re: Toggle Classes

2009-10-07 Thread craigeves
I have just updated my code and still no luck :( Here is my new code... can anyone help? Thanks, Craig JS $(document).ready(function(){ $('.expander_content').hide(); $('.expander h3').click(function () { $(this).next('.expander_content').slideToggle('slow'); $