Actually, you don't need the > 0 part. 0 evaluates to false anyway, so
just if($("#whatev").length) works fine

On Oct 17, 4:09 pm, "Mauricio \(Maujor\) Samy Silva"
<[EMAIL PROTECTED]> wrote:
> Another approach:
> if ( $('#FirstDiv').length > 0 ) { $('#SecondDiv').show(); }
> --------------------------------------------------------------------------
> De: "MorningZ" <[EMAIL PROTECTED]>
> if (document.getElementById("FirstDiv")) { $("#SecondDiv").hide(); }
> --------------------------------------------------------------------------
>
> On Oct 17, 1:47 pm, Taylor <[EMAIL PROTECTED]> wrote:
>
> > Is there a simple way with jQuery to find a div with a specific id,
> > and display a different div if the id is found

Reply via email to