[jQuery] Re: Changing class on a preceding element by click link in another div

2007-06-04 Thread Jared Hawkins
Karl, I removed the space you spotted and it works! You are awesome! As for the other methods, thanks for sharing. I'll be studying them to understand their approaches. Thanks On Jun 3, 11:23 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Ah ha! I think I see the problem, Jared: > > > > Notic

[jQuery] Re: Changing class on a preceding element by click link in another div

2007-06-03 Thread Karl Swedberg
Ah ha! I think I see the problem, Jared: Notice the space between accToggler and the quotation mark? I think that will kill it in IE, because it's looking for an exact match on the className property. If you can't avoid that space, you could switch the expression around a bit to say on cl

[jQuery] Re: Changing class on a preceding element by click link in another div

2007-06-03 Thread [EMAIL PROTECTED]
It seems IE6 and IE7, but not Firefox 2. Here's a link to the page: http://www.studioturn.com/staging/nr/ailment/adult-add-adhd-symptoms-solutions-info.html The script is on a link in a purple colored box a bit down the page with the text "The Difference Between ADD and ADHD" On Jun 3, 7:32

[jQuery] Re: Changing class on a preceding element by click link in another div

2007-06-03 Thread Karl Swedberg
Weird. Only in IE7? Can you point us to a page that has the code? It might help to see it in action and take a look at the HTML as well. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jun 3, 2007, at 6:04 PM, [EMAIL PROTECTED] wrote: It seems I spok

[jQuery] Re: Changing class on a preceding element by click link in another div

2007-06-03 Thread [EMAIL PROTECTED]
It seems I spoke too soon. It appears that the very first instance of the .accToggler class does not have its class changed to the .accTogglerClose class when clicked in IE7. The .accContent expands, but the class does not change. My "close" link in the expanded content when clicked sets the class

[jQuery] Re: Changing class on a preceding element by click link in another div

2007-05-27 Thread [EMAIL PROTECTED]
Perfect! Thank you! On May 25, 7:43 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi Jared, > > It looks like the problem now might be caused by the .click() on the > p.close sort of butting into the add/remove class game where > the .toggle() method was handling it just fine. I'm going to sugge

[jQuery] Re: Changing class on a preceding element by click link in another div

2007-05-25 Thread Karl Swedberg
Hi Jared, It looks like the problem now might be caused by the .click() on the p.close sort of butting into the add/remove class game where the .toggle() method was handling it just fine. I'm going to suggest losing the .toggle() altogether and swapping the class with your initial .click(

[jQuery] Re: Changing class on a preceding element by click link in another div

2007-05-25 Thread [EMAIL PROTECTED]
Karl, that worked perfect. However, when I then click on the toggler that has been changed back, the class on it is not being changed. Here's the complete jQuery stuff, with the section you refined at the bottom: $(function() { $ ('#ailment').find('.accContent').hide().en

[jQuery] Re: Changing class on a preceding element by click link in another div

2007-05-25 Thread Karl Swedberg
Hi Jared, It looks like there are a few ways you can tighten up your selectors, but the part that you're asking about could be changed from this ... $('#ailment').find('.close').click(function() { $('.accContent').slideUp(); $(this).prev('.accToggler').removeClass (