Alexandre Plennevaux wrote:
hello,
i'm trying to test a condition whether a link has a given class, and
have it return "true" or "false".
if ($(this).attr("class")=='refresh') {
alert("changing page");
return true;
}
else
{
return false;
}
Try, from memory:
if ($(this).is(".CLA
hi Michael,
i just did :
if ($(this).filter(".selected")) {
return true;
}
else
{
and it worked !
On Apr 27, 10:44 am, Michael Price <[EMAIL PROTECTED]> wrote:
> Alexandre Plennevaux wrote:
> > hello,
>
> > i'm tryin
pixeline wrote:
hi Michael,
i just did :
if ($(this).filter(".selected")) {
return true;
}
else
{
and it worked !
That's not quite right. .filter() returns a jQuery object, which will
always evaluate to true. To u
Thank you Dave and Michael!
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Cardwell
Sent: vendredi 27 avril 2007 11:06
To: jQuery (English)
Subject: [jQuery] Re: test if element as a class
pixeline wrote:
> hi Michael,
>
> i
4 matches
Mail list logo