Luc Pestille schreef:
> // add class to change colour
> $('#idol_datetime_day1
> option:disabled').addClass("required").get(0).focus();
>
change to
$('#idol_datetime_day1
option:disabled').addClass("required").eq(0).focus();
This seems to be a common mistake. Maybe on one of the l
on:disabled').addClass("required").get(0).focus();
return false;
}else{
$('#idol_datetime_day1
option:disabled').removeClass("required");
}
Thanks,
Luc
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Me
> $('#myselect option').is(":disabled").addClass('disabled');
.is() isn't chainable, but you can just add :disabled to the selector:
$('#myselect option:disabled').addClass('disabled');
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/di
Luc Pestille schrieb:
> Nope, that didn't work - I suspect (read:complete guess) because
> #myselect is the select element itself, not the option within it. Anyone
> else offer a solution?
>
> if ( $('#myselect').is(":disabled") ){
> //don't submit the form
> }
$('#myselect option').is("
[mailto:[EMAIL PROTECTED] On Behalf Of Sam
CollettSent: 18 October 2006 17:07To: jQuery
Discussion.Subject: Re: [jQuery] Checking select option has
class?
On 18/10/06, Luc Pestille <[EMAIL PROTECTED]> wrote:
Hi all,
Thanks to IE's
On 18/10/06, Luc Pestille <[EMAIL PROTECTED]> wrote:
Hi
all,
Thanks to
IE's wonderful ommission of disabled="disabled" for options in select drop
downs, I need to add a class to disabled options and and check for that class
when the form is submitted. How do I check the selected
Hi
all,
Thanks to
IE's wonderful ommission of disabled="disabled" for options in select drop
downs, I need to add a class to disabled options and and check for that class
when the form is submitted. How do I check the selected option has a class
within a select?
if ( $('#myselect'