Events (e.g. beforeopen) not working
Closed this issue · 2 comments
pikooh commented
We're using the newest version of selectBox with jQuery v2.0.3 and it's not possible to use the events described on the main site. Change is working, but beforeopen, open, beforeclose etc. won't work and throw an error.
Code:
$(el).selectBox({
mobile: true,
menuSpeed: 'fast',
menuTransition: 'fade',
})beforeopen(function(){
console.log( "foo" );
});
Error:
Uncaught TypeError: Object [object Object] has no method 'beforeopen'
Is there a way to fix it?
marcj commented
I don't know, never used jQuery 2 with selectBox. Feel free to submit a PR. :-)
pikooh commented
I just tried it with jQuery 1.7.1, same as included in the example page. No luck.
//Edit: before I used 1.7.2, but it doesn't work on either.
PS: thanks for the really quick answer!
// Edit2: it works with this:
.on( "beforeopen", this._handleSelectBeforeOpen )