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
Post a Comment