Figure out div that is visible out of four divs.
Posted
by RedWolves
on Stack Overflow
See other posts from Stack Overflow
or by RedWolves
Published on 2008-09-14T17:27:28Z
Indexed on
2010/05/07
16:58 UTC
Read the original article
Hit count: 113
I need to figure out what div is visible out of four possible divs using jQuery. Only one of those div's will be visible at any given time.
This is what I have that works so far:
$("#FeatureImage1:visible, #FeatureImage2:visible, #FeatureImage3:visible, #FeatureImage4:visible").attr("id");
Is there a way to refactor this? Is there an easier way to figure this out?
© Stack Overflow or respective owner