Hi Michael, actually I just tired but I am getting Object object as a
result. Could it be that I am using the same id in the div tag,
however when I gave unique ids my alert still returned Object object?
My js:
<script type="text/javascript">
$(document).ready(function(){
$("#toggleboxes1").toggleboxes({
header: "h3",
icons: {
'header':
'ui-icon-circle-triangle-e',
'headerSelected':
'ui-icon-circle-triangle-s'
}
});
});
function loadIFrame(index){
alert($('#toggleboxes:visible'));
//alert('indx:' + $
(".toggleboxes1").toggleboxes().children("h3").);
//alert('length:' +
$(".toggleboxes1").toggleboxes(0).active);
}
</script>
here is my HTML:
<div id="toggleboxes1">
<div id="toggleboxes" onclick="loadIFrame(0);" >
<h3><a href="#">Key Metrics</a></h3>
<div class="full-content"></div>
</div>
<div id="toggleboxes" onclick="loadIFrame(1);">
<h3><a href="#">Label</a></h3>
<div class="full-content"></div>
</div>
<div id="toggleboxes" onclick="loadIFrame(2);">
<h3><a href="#">Video</a></h3>
<div class="full-content"></div>
</div>
</div>
cheers,
Martin
On Mar 30, 8:14 am, "mk.keck" <[email protected]> wrote:
> Have you tried
> $('.toggleboxes1:visible')?
> This should give you true, if it is opened.
>
> Michael
>
> On 30 Mrz., 01:23, Martin <[email protected]> wrote:
>
>
>
> > using jquery-ui-togglebox.js on a site to give a user an option to
> > have multiple accordions open. I added onclick event on the div to
> > load source into iframe. However, I need to only load the source into
> > iframe when the togglebox is active. Does anyone know how I can
> > determine if togglebox is active?
>
> > togglebox div:
> > <div id="toggleboxes" onclick="loadIFrame('iframe-${iframe}','$
> > {mstrObject.firstChild.objectUrl}');">
>
> > my js:
> > function loadIFrame(iframeId, reportUrl){
>
> > var isActive2 =
> > $(".toggleboxes1").toggleboxes( "option",
> > "active");
> > alert('isActive2:' + isActive2);
>
> > var iframe =
> > document.getElementById(iframeId);
> > iframe.src=reportUrl;
> > }
--
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en.