Closed LordPachelbel closed 5 years ago
I'm having the same issue
I'm also having this problem. Did you find a fix?
Downgrading jquery-accessible-accordion-aria to version 2.5.2 fixed this issue for me.
The answer should be somewhere in it https://jquery.com/upgrade-guide/3.0/ I'have no idea at this time.
putting in comment ` // this.$wrapper.on('keydown', this.options.buttonsSelector, $.proxy(this.keydownButtonEventHandler, this));
// this.$wrapper.on('keydown', this.options.panelsSelector, $.proxy(this.keydownPanelEventHandler, this));
` solved the issue with jquery 3.x
So it's related to #35
Sorry for delay (really too busy): it is fixed via https://github.com/nico3333fr/jquery-accessible-accordion-aria/commit/f526a457179834392375cc313bbcafff6f335cbf
When using jQuery 3.x, calling
$('.js-accordion').accordion();
causes the following error:TypeError: can't assign to property "guid" on ".js-accordion__panel": not an object debugger eval code:2:39624
(That's Firefox dev edition's wording.)
After this error occurs, the accordions still work — you can click on them and they will expand and collapse just fine — but any other jQuery code that comes after the
.accordion()
call will fail to run, which can break the page if jQuery is supposed to do anything else after the accordions are created.My browser debugger shows that line 101 of the plugin triggers the error:
this.$buttons = $(this.options.buttonsSelector, this.$wrapper);
The error happens inside jQuery 3.x's
jQuery.event
object's helper function.add()
, on lines 4976-4979:Edit: The 3.x version of the jQuery Migrate plugin doesn't fix the problem.