Glen Lipka schrieb:
> If the ID only has one class you can also say:
> $("#myID[class=foo]").fadeOut();
> or
> var theNode = $("#myID[class=foo]")
That should read $("[EMAIL PROTECTED]")!
-- Klaus
___
jQuery mailing list
discuss@jquery.com
http://jque
On 3/5/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
Also, wouldn't your example work without the IF?
$("#myId).is("myClass").fadeOut();
or
var theNode = $("#myId).is("myClass")
Neither of those would work because is() returns true/false.
[1] http://docs.jquery.com/DOM/Traversing#is.28_expr_
On 05/03/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
> If the ID only has one class you can also say:
> $("#myID[class=foo]").fadeOut();
> or
> var theNode = $("#myID[class=foo]")
>
> Also, wouldn't your example work without the IF?
> $("#myId).is("myClass").fadeOut();
> or
> var theNode = $("#myId).
If the ID only has one class you can also say:
$("#myID[class=foo]").fadeOut();
or
var theNode = $("#myID[class=foo]")
Also, wouldn't your example work without the IF?
$("#myId).is("myClass").fadeOut();
or
var theNode = $("#myId).is("myClass")
Glen
If you want to determine whether #myId has
On 3/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
What is the jQuery syntax to ge the class name of an item with a known id?
var myClassAttr = $("#myId").attr("class");
Will store the entire contents of #myId's "class" attribute in the variable
"myClassAttr"
If you want to determine w
Hi,
What is the jQuery syntax to ge the class name of an item with a known id?
Thanks, - Dave
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/