uot;label");
>/* ... do something with myOptGrpLabel... */
>
> The parents("OPTGROUP") could be overkill, maybe just .parent() is enough
> if you're sure the option elements are in an optgroup.
>
> George
>
>
>
> GreyCells wrote:
>>
>
.find("[EMAIL PROTECTED]").parents("OPTGROUP").attr("label");
>/* ... do something with myOptGrpLabel... */
>
> The parents("OPTGROUP") could be overkill, maybe just .parent() is enough
> if you're sure the option elements are in an optgroup.
&g
I'd like to be able to display the optgroup label attribute value after a
select list is changed. This is what I have so far, but I think I'm heading
down the wrong track, because a) I want the optgroup label value, not the
selected option value and b) I don't want to keep appending if the user
ch
For anyone searching for similar answers, I've since learnt that this works
too:
$("#testDiv:not([input:checked])").hide();
The explanation (courtesy of Dave Methvin):
#testDiv// select an element with id=testDiv
:not( // as long as the following is not found
Excellent, Dave. Your explanation is much appreciated. I'd tried something
similar in my 'period of frustration', but didn't know about the []'s
denoting descendents.
dave.methvin wrote:
>
>> What I'm trying to achieve is the element with id="save-search" only
>> gets hidden if it does not co
Thanks Mike. Have to admit to a fatal flaw in my logic (that a nothing select
would return nothing), but I'm still *extremely* impressed with JQuery (just
not with myself)
malsup wrote:
>
>> $(document).ready(function() {
>> if (!$("#save-search div.error-message")) $("#save-search").hide();
is:
>
> $(document).ready(function() {
> if ( $("#save-search div.error-message").length == 0 )
> $("#save-search").hide();
> });
>
> Karl Rudd
>
> * A slightly obscure reference to Duck Typing -
> http://en.wikipedia.org/wiki/Duck_typing
>
>
should be, but it doesn't have the desired effect:
$(document).ready(function() {
if (!$("#save-search div.error-message")) $("#save-search").hide();
});
Would it be possible to let me know not just how to get this to work, but
also where I'm going wrong?
In search o
Wow! Many thanks Chris, it worked a treat. There was me messing around with
wildcards an' all :)
Chris Domigan wrote:
>
> I think you can do:
>
> if (!$("#testDiv input:checkbox").is(":checked")) $("#testDiv").hide();
>
> (Notice the "!"). Not tested though.
>
> Chris
>
>
--
View this me
uot;' attribute. All
I've managed to do so far is to hide/not hide the checkboxes that are
checked - not quite the result I was hoping for :)
Is this the sort of selection that JQuery can handle easily, or do I have to
write a function?
Many thanks
~GreyCells (now subscribed)
--
10 matches
Mail list logo