Re: [jQuery] toggling radio buttons

2007-02-27 Thread Andy Matthews
That worked perfectly Mike. Thanks! 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Tuesday, February 27, 2007 2:18 PM
To: jQuery Discussion.
Subject: Re: [jQuery] toggling radio buttons

> I'd like to write a  jQ script which sets all o values (unapproved) to 1
(approved). I thought that  one of these two would do it:
> $("[EMAIL PROTECTED]@checked]").val(1);
> $('[EMAIL PROTECTED]').val('1');


Give this a shot:

$(':radio:not(:checked)').attr('checked', true);

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] toggling radio buttons

2007-02-27 Thread Alex Ezell

Maybe you could set the value explicitly, provided the selection works:
$('[EMAIL PROTECTED]@checked]').set('value',1);

/alex
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] toggling radio buttons

2007-02-27 Thread Andy Matthews
I have a series of radio buttons with values of either 1 or 0.
 
I'd like to write a jQ script which sets all o values (unapproved) to 1
(approved). I thought that one of these two would do it:
$("[EMAIL PROTECTED]@checked]").val(1);
$('[EMAIL PROTECTED]').val('1');
 
 
in the following context:
$('.approve').click(function() {
$("[EMAIL PROTECTED]@checked]").val(1);
// $('[EMAIL PROTECTED]').val('1');
return false;
});
 
i know that I'm getting inside the click function, but for some reason it
doesn't seem to be setting the values correctly. Anyone have an idea?
 

 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com  
 


attc21f7.bmp
Description: Windows bitmap
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] toggling radio buttons

2007-02-27 Thread Mike Alsup
> I'd like to write a  jQ script which sets all o values (unapproved) to 1 
> (approved). I thought that  one of these two would do it:
> $("[EMAIL PROTECTED]@checked]").val(1);
> $('[EMAIL PROTECTED]').val('1');


Give this a shot:

$(':radio:not(:checked)').attr('checked', true);

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Toggling

2007-02-24 Thread Seb Duggan

This should do it (not tested):

$(".parent").click(function() {
$(this).next(".sub").toggle(400);
return false;
});



Seb



On 24 Feb 2007, at 15:39, poncjusz wrote:


Hi everyone I've html code:

Something
Something
Something
Something
Something
Something
Something

and jquery code:
$(document).ready(function() {
$(".sub").hide();

$(".parent").click(function() {
$(".sub").toggle(400);
return false;
});
});

everything is ok until there is more then 1 link with parent class,  
when I click on link with parent class all divs with sub class  
slidingDown :/, what I should do? I want different behaviour: when  
I click on parent link only the nearest sub should slideDown.


Thanks in advance for help

Tomek

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Toggling

2007-02-24 Thread poncjusz
Hi everyone I've html code: 

Something
Something
Something
Something
Something
Something
Something

and jquery code:
$(document).ready(function() {
$(".sub").hide();

$(".parent").click(function() {
$(".sub").toggle(400);
return false;
});
});

everything is ok until there is more then 1 link with parent class, when I 
click on link with parent class all divs with sub class slidingDown :/, what I 
should do? I want different behaviour: when I click on parent link only the 
nearest sub should slideDown.

Thanks in advance for help

Tomek

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Toggling div based on radio buttons

2006-12-14 Thread Alex Cook
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Calamity
Subject: [jQuery] Toggling div based on radio buttons

Basically I have a form with several fieldsets (I can wrap them in divs
if
absolutely necessary) that need to be displayed/hidden based on radio
button
selection. For example:

There are 4 radio buttons: Software, Hardware, Telecom and Field Device

If a user clicks Software, it should display the fieldset that contains
pertinent information for software. If a user misclicked, or has an
additional request for say, hardware, I would like any section that is
shown
to be hidden prior to showing the hardware section.

-

That should be simple enough... Here is some code to get your started:

http://pastie.caboo.se/27620 - HTML

http://pastie.caboo.se/27621 - JavaScript

I tried to keep it pretty basic so it should work with whatever you're
HTML set up is.  Make the fieldset and the radio have the same className
and you should be kosher.

-ALEX

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Toggling div based on radio buttons

2006-12-14 Thread Dave Methvin

In the markup, have the fieldsets use class="RequestDetail" id="InfoTYPE"
where TYPE is Software, Hardware, etc. and all initially display:none. The
radio group is name="RequestType" value="TYPE". Untested code, but here's
the idea:

$("#myform [EMAIL PROTECTED]").bind("click", function(){
   $("#myform .RequestDetail:visible).hide();
   $("#Info"+this.value).show();
});

Complicate as needed. :-)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Calamity
Sent: Thursday, December 14, 2006 10:39 AM
To: discuss@jquery.com
Subject: [jQuery] Toggling div based on radio buttons

hi, been playing with jQuery for all of about 3 days, and I need some
assistance on something simple.

Basically I have a form with several fieldsets (I can wrap them in divs if
absolutely necessary) that need to be displayed/hidden based on radio button
selection. For example:

There are 4 radio buttons: Software, Hardware, Telecom and Field Device

If a user clicks Software, it should display the fieldset that contains
pertinent information for software. If a user misclicked, or has an
additional request for say, hardware, I would like any section that is shown
to be hidden prior to showing the hardware section.

I am, unfortunately, struggling with this, any ideas out there?


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Toggling div based on radio buttons

2006-12-14 Thread Calamity

hi, been playing with jQuery for all of about 3 days, and I need some
assistance on something simple.

Basically I have a form with several fieldsets (I can wrap them in divs if
absolutely necessary) that need to be displayed/hidden based on radio button
selection. For example:

There are 4 radio buttons: Software, Hardware, Telecom and Field Device

If a user clicks Software, it should display the fieldset that contains
pertinent information for software. If a user misclicked, or has an
additional request for say, hardware, I would like any section that is shown
to be hidden prior to showing the hardware section.

I am, unfortunately, struggling with this, any ideas out there?
-- 
View this message in context: 
http://www.nabble.com/Toggling-div-based-on-radio-buttons-tf2821322.html#a7874735
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/