This is the option I asked earlier.
With a Bootstrap accordion, how can I get the id of the panel with the specified index (e.g. index 0)?
thought something line by line
var id = $('#accordion .in').get(0).attr("id");
considers
use eq () in jquery.
var id = $('#accordion .in').eq(0).attr("id");