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? I know this may not
be the best way to accomplish
Another approach:
if ( $('#FirstDiv').length 0 ) { $('#SecondDiv').show(); }
--
De: MorningZ [EMAIL PROTECTED]
if (document.getElementById(FirstDiv)) { $(#SecondDiv).hide(); }
Thank you. They both worked great.
On Oct 17, 3:09 pm, Mauricio \(Maujor\) Samy Silva
[EMAIL PROTECTED] wrote:
Another approach:
if ( $('#FirstDiv').length 0 ) { $('#SecondDiv').show(); }
--
De: MorningZ [EMAIL
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(); }
Here's another trick to accomplish it:
$('#first, #second').eq(1).show();
--Klaus
On 18 Okt., 00:00, Ryura [EMAIL PROTECTED] wrote:
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
5 matches
Mail list logo