[jQuery] Re: Noob syntax question re toggle between css attributes

2007-08-07 Thread Glen Lipka
The funny thing is, I can't remember the syntax for any of this stuff. I literally go to http://jquery.com/api every time I want a click function. The important thing is to remember what is possible. Just the core alone is so powerful. Then add the plugins and it's virtually unlimited. If jQuery

[jQuery] Re: Noob syntax question re toggle between css attributes

2007-08-07 Thread dug
Glen, When I started trying to do this with jquery this morning I tried using toggle but instead got bogged down trying to make is work as part of an 'animate' hash... Your solution works beautifully! Thanks very much :-) Ben, I'd been putting alerts in to try and figure out why my if statement

[jQuery] Re: Noob syntax question re toggle between css attributes

2007-08-07 Thread dug
Glen, When I started trying to do this with jquery this morning I tried using toggle but instead got bogged down trying to make is work as part of an 'animate' hash... Your solution works beautifully! Thanks very much :-) Ben, I'd been putting alerts in to try and figure out why my if statement

[jQuery] Re: Noob syntax question re toggle between css attributes

2007-08-07 Thread Glen Lipka
You may want to check out the Toggle function. It might eliminate the need for the IF. Maybe even the toggleClass() method? http://www.jquery.com/api $(".doSetSelect").toggle(function(){ $(this).parents(".def_set").addClass("selected"); },function(){ $(this).parents(".def_set").removeClass("

[jQuery] Re: Noob syntax question re toggle between css attributes

2007-08-07 Thread Benjamin Sterling
Dug, When you put alert($(this).parents(".def_set").css("backgroundColor")); inside the click, what response do you get? On 8/7/07, dug <[EMAIL PROTECTED]> wrote: > > > Dear all, > > I've been faffing with this thing all morning. The more I faff, the > closer I get to using getElementById. The fol