hello Karl,
 
thanks a lot!
 
°-]
 
A.

   _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Karl Swedberg
Sent: lundi 7 mai 2007 15:33
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Detect if an element is visible


Hi Alexandre, 

You could do something like this: 

if $('.my-class').is(':visible') { // your code here}

or you could just do this:

$('.my-class:visible').whatever();

Either way, the magic is in :visible




--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On May 7, 2007, at 11:19 AM, Alexandre Plennevaux wrote:


hello!
 
i use a series of show() and hide() on my DOM, and everything is hidden on
document.ready via jquery.
 
i would need to test at some moment if an element has been shown(). i tried
testing against the value of the display css property but that returns
undefined. 
 
Is there a proper way to do that?
 
Thank you!
 
 
Alexandre
 

Alexandre Plennevaux - LAb[au] asbl.vzw / MediaRuimte
Lakensestraat/Rue de Laeken 104
B-1000 Brussel-Bruxelles-Brussels
Belgie-Belgique-Belgium

Tel:+32(0)2.219.65.55
Fax:+32(0)2.426.69.86
Mobile:+32(0)476.23.21.42
HYPERLINK "blocked::http://www.lab-au.com/"http://www.lab-au.com
HYPERLINK "blocked::http://www.mediaruimte.be/"http://www.mediaruimte.be

HYPERLINK
"blocked::http://www.mediaruimte.be/"_______________________________________
___________________________________

The information in this e-mail is intended only for the addressee named
above.  If you are not that addressee, please note that any disclosure,
distribution or copying of this e-mail is prohibited.
Because e-mail can be electronically altered, the integrity of this
communication cannot be guaranteed.

__________________________________________________________________________

 


Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.467 / Base de données virus: 269.6.5/792 - Date: 6/05/2007
21:01




Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.467 / Base de données virus: 269.6.5/792 - Date: 6/05/2007
21:01
 

Reply via email to