Because this wasn't immediately obvious to me when I started out, here
is why:
The jQuery selector will always return an object. Eg:
typeof($("#doesntExist")) == "object".
That means if( $("#doesntExist") ) will evaluate true.
This is intentional - ie, if you do something like this:
$
Try doing
if ( $('#specialSection').length )
in your conditional.
-- Josh
- Original Message -
From: "Sharique" <[EMAIL PROTECTED]>
To: "jQuery (English)"
Sent: Tuesday, April 22, 2008 12:22 PM
Subject: [jQuery] searching css id
Hi,
What I'm trying to is that when there is c
2 matches
Mail list logo