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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -