jquery - Figure out div that is visible out of four divs -


i need figure out div visible out of 4 possible divs using jquery. 1 of div's visible @ given time.

this have works far:

$("#featureimage1:visible, #featureimage2:visible, #featureimage3:visible, #featureimage4:visible").attr("id"); 

is there way refactor this? there easier way figure out?

assign same class each div then:

$("div.myclass:visible").attr("id"); 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -