[jQuery] Re: Best way to Toggle

2009-01-05 Thread Eric Hobo Garside
Try: $(':checkbox').click(function(){ $(this).parents('fieldset').next('fieldset').slideToggle(); }); .parent() has a limited scope and will return only the parent elements. In the example you gave, fieldset is not a parent of input, but an ancestor. .parents() with the s at the end will do

[jQuery] Re: Best way to Toggle

2009-01-05 Thread daweb
Oh God, it runs. Thank you!! On 5 Gen, 16:35, Eric \Hobo\ Garside gars...@gmail.com wrote: Try: $(':checkbox').click(function(){     $(this).parents('fieldset').next('fieldset').slideToggle(); }); .parent() has a limited scope and will return only the parent elements. In the example

[jQuery] Re: Best way to toggle a form field value

2008-08-21 Thread FrenchiINLA
$('a').click(function(){$('input[name=' + this.id+ ']').val(!$ ('input[name=' + this.id+ ']').val())});// On Aug 21, 7:02 am, Andy Matthews [EMAIL PROTECTED] wrote: I'm storing a boolean in a hidden field, and I'd like to flip it's value when someone clicks a link. Here's the function I've got

[jQuery] Re: Best way to toggle a form field value

2008-08-21 Thread Andy Matthews
Anyone have input on this? This code runs, but it doesn't seem to want to toggle the value of the form field at all. It changes it once, then continues using the same value. _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Thursday, August 21,