Side navigation
#4593 closed bug (invalid)
Opened April 27, 2009 12:35PM UTC
Closed October 13, 2009 12:50AM UTC
Last modified March 15, 2012 02:18PM UTC
accordion getter option active always returns null
Reported by: | dekiland | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | unfiled | Version: | 1.3.2 |
Keywords: | accordion option active | Cc: | |
Blocked by: | Blocking: |
Description
Hi there ...
I'm trying unsuccessfully to grab the id/index of the active pane of an accordion widget. For example, using the example.html file that came with
jqueryUI, I have:
$("#accordion").accordion({ header: "h3"});
<h2 class="demoHeaders">Accordion</h2>
<div id="accordion">
<div>
<h3><a href="#">First</a></h3>
<div>Lorem ipsum dolor sit amet. Lorem
ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>
</div>
<div>
<h3><a href="#">Second</a></h3>
<div>Phasellus mattis tincidunt
nibh.</div>
</div>
<div>
<h3><a href="#">Third</a></h3>
<div>Nam dui erat, auctor a, dignissim
quis.</div>
</div>
</div>
I then added a button which called a function in order to show me which
pane was active:
$("#testAcc").click(function() {
var foo =
$('#accordion').accordion('option', 'active');
alert(foo);
return false;
});
This function always reports 'null'. If I set the accordion's initial structure to have active=false, the click function always returns 'false'. I must be daft here as in the documentation they say that this pattern (('option', 'active')) is the getter for the active element, but
it seems to only ever report the initial state.
Attachments (0)
Change History (1)
Changed October 13, 2009 12:50AM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
This is not a jQuery core bug. Please use the jQuery forums or contact the author via the method they request. For jQuery UI plugins, please file a bug on http://dev.jqueryui.com .