This is a migrated thread and some comments may be shown as answers.

Select Event Not Raised When Select Method is Executed

1 Answer 147 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 25 Jul 2012, 08:41 PM
As is modeled in this jsfiddle, when one selects an item via the mouse, the event is raised.  My question is, why isn't the event raised when the user clicks on the button?

Is this a bug?  In the docs it clearly states that the select event is "triggered when an item of a PanelBar is selected."

1 Answer, 1 is accepted

Sort by
0
Frank
Top achievements
Rank 1
answered on 03 Aug 2012, 07:29 PM
Hi Nick,

I have noticed the same behaviour. It could probably be fixed by adding a eventTrigger() call in the source of the select method, but in case you do not have access to the full source you could solve it by faking a click event (which will both select and expand it). That's how I have solved it for now.

$("#panelbar li:last > span").trigger("click");

Hope this helps anybody running into the same problem.
Tags
PanelBar
Asked by
Nick
Top achievements
Rank 1
Answers by
Frank
Top achievements
Rank 1
Share this question
or