[jQuery] Re: check/uncheck via toggle

2008-04-03 Thread Mr.MoOx
Like the doc said : Only properties that take numeric values are supported (e.g. backgroundColor is not supported by animate()). So you cool use a plugin: http://dev.jquery.com/~john/ticket/fx-rewrite2/ OR http://www.happinessinmycheeks.com/colorBlend/ With the first plugin, I will wrote this:

[jQuery] Re: check/uncheck via toggle

2008-04-03 Thread Bruce MacKay
Thanks all for your solution. Just to wrap up the point that Karl raised about the $(this).attr('checked', true) part - in my earlier attempts I didn't have that in, but I found that clicking the check box wouldn't check/uncheck it by default. The background colour change was fired, but

[jQuery] Re: check/uncheck via toggle

2008-04-02 Thread Karl Rudd
The toggle() function is used to hide and show items, nothing to do with clicking or changing of state. http://docs.jquery.com/Effects/toggle What you want is something like: $('[EMAIL PROTECTED]').click( function() { if ( this.checked )

[jQuery] Re: check/uncheck via toggle

2008-04-02 Thread Erik Beeson
Also, '[EMAIL PROTECTED]' can be replaced with ':checkbox'. --Erik On 4/2/08, Karl Rudd [EMAIL PROTECTED] wrote: The toggle() function is used to hide and show items, nothing to do with clicking or changing of state. http://docs.jquery.com/Effects/toggle What you want is something like:

[jQuery] Re: check/uncheck via toggle

2008-04-02 Thread Karl Swedberg
Actually, .toggle() is a little like .load() in that it can be used for two different things. There is the .toggle() effect and the .toggle(fn, fn) event, with the .toggle(fn, fn) doing an every other event thing. http://docs.jquery.com/Effects/toggle

[jQuery] Re: check/uncheck via toggle

2008-04-02 Thread Karl Rudd
*head smack* I missed that version of the function. It's definitely not something I've used. Karl Rudd On Thu, Apr 3, 2008 at 1:47 PM, Karl Swedberg [EMAIL PROTECTED] wrote: Actually, .toggle() is a little like .load() in that it can be used for two different things. There is the .toggle()