Closed martinbean closed 8 years ago
Make sure you are using the latest version of the jQuery widget factory!
same issue here, jquery ui 1.12.1
Found the issue in my case. If you have something like:
$('.my-select').selectBoxIt();
Now the select class is duplicated and $('.my-select')
will return 2 elements, span
and select
. So you might get undefined
if you do:
$('.my-select').data('selectBox-selectBoxIt');
To make sure you get the selectBoxIt
object do:
$('select.my-select').data('selectBox-selectBoxIt');
I have a web application with select boxes replaced with selectBoxIt. Looking at the mark-up in Safari’s web inspector on desktop, I can see the plugin has initialised (as the select box is replaced with the selectBoxIt mark-up), but I can’t get to the plugin instance. Whenever I use
.data('selectBox-selectBoxIt')
I get the following error: