Friday 15 June 2012

javascript - Find id of panel at active index accordian bootstrap -



javascript - Find id of panel at active index accordian bootstrap -

if want retrieve index of active panel of accordion in bootstrap utilize following.

var index = $('#accordion .in').parent().index();

how retrieve 'id' of active panel?

regards

you can utilize jquery attribute selector of format attr("id")

var id = $('#accordion .in').parent().attr("id");

javascript jquery twitter-bootstrap-3

No comments:

Post a Comment