Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#6740 closed bug (fixed)

Dynamically changing accordion's event handler doesn't actually change the behaviour

Reported by: jjross Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.accordion Version: 1.8.7
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Scott González)

I'm trying to change the accordion's event handler on the fly but it doesn't appear to be working.

Business case is as follows:

I have a list of droppable items that are all under an accordion. When a user drags the draggable item towards the accordion I would like to change the accordion's event handler from "click" to "mouseover" so that they can hover over a panel and have it automatically expand. This will let them drop the item under any panel.

test case

In this page you can click the "Change event" text to change the accordion's event from (the default) "click" to "mouseover". However, the accordion itself doesn't start to respond to a mouseover. If you click the "Read event" you'll see that the "Display event status here" line changes to "mouseover". This proves that the value has been changed, however, the accordion's behaviour remains the same.

The above is for jquery 1.8.6 however I have also tested on 1.8.7 and the behaviour remains the same.

Change History (6)

comment:1 Changed 9 years ago by Scott González

Status: newopen

comment:2 Changed 9 years ago by jjross

Here is a link to a test case:

http://jsfiddle.net/ubMrz/

I'm sorry, I just noticed the note to use jsFiddle.

comment:3 Changed 9 years ago by Scott González

Description: modified (diff)

Thanks for creating the jsFiddle test case, I've removed the inline code from the description.

comment:4 Changed 9 years ago by jjross

No worries. Should've noticed before.

comment:5 Changed 9 years ago by Scott González

Resolution: fixed
Status: openclosed

Accordion: Handle changing the event option. Fixes #6740 - Dynamically changing accordion's event handler doesn't actually change the behaviour.

Changeset: f70f01af9ea1d1d191b77fab6dadbbe421be43a8

comment:6 Changed 7 years ago by Scott González

#8336 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.