accordian how to determine if active
How can I determine if an accordion is active? I allow for multiple accordions to be opened by users and load an iframe with onclick event when user clicks on the div. However, I need to only load the iframe when the accordion is active but don't know how to do this.
HTML example:
<div id="toggleboxes" onclick="loadIFrame('iframe-${iframe}','${mstrObject.firstChild.objectUrl}');">
In my javascript I want to only set the iframe source when the accordion is active. How can I find out if my accordion is active?:
function loadIFrame(iframeId, reportUrl){
//getter
var isActive = $( ".selector" ).accordion( "option", "active");
alert('in loadIFrame, isActive:' + isActive);
var iframe = document.getElementById(iframeId);
iframe.src=reportUrl;
}