JQuery accordion plugin: how do I get accordion clicked?

It looks like you can use the "active" value from the "options" object change: function(event, ui) { alert(ui.options.active.toString()); } this throws up the ID of the active pane (the one that was just selected).

It looks like you can use the "active" value from the "options" object. Change: function(event, ui) { alert(ui.options.active.toString()); } this throws up the ID of the active pane (the one that was just selected).

Perfect. Exactly what I needed. Thanks.

– Eric Dec 7 '10 at 21:37 I'm glad it worked for you. – jjross Dec 8 '10 at 2:54.

From the docs - you are looking for ui.newHeader. $("#galleryaccordion"). Accordion({ change: function(event, ui) { ui.

NewHeader // jQuery object, activated header ui. OldHeader // jQuery object, previous header ui. NewContent // jQuery object, activated content ui.

OldContent // jQuery object, previous content } }).

Josiah-- I saw that in the docs but that doesn't help me. I need the ID number of which element was clicked in the accordion. I dumped those objects to firebug and didn't see what I was after.(Incidentally, this is my frustration with the jQuery docs-- they're like "here's an object, good luck!"

:-) Wish things were enumerated a bit more. ) – Eric Dec 7 '10 at 21:34 Ahh, I see. You were looking for the index.

– Josiah Ruddell Dec 7 '10 at 22:02.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions