gfranko / jquery.selectBoxIt.js

A jQuery Select Box Plugin for Mobile, Tablet, and Desktop
http://www.selectboxit.com
MIT License
852 stars 301 forks source link

Cannot read property 'selectOption' of undefined #282

Closed Antera closed 10 years ago

Antera commented 10 years ago

Hello,

.selectOption() is not working anymore for me, i have no idea why : On the homepage http://bit.ly/ILSDby , I select something like "bedrooms" or "price", then click "Go" JS is on line 3973 : $("#bedrooms").data("selectBox-selectBoxIt").selectOption("1");

I got this error and the option is not selected : TypeError: Cannot read property 'selectOption' of undefined

Many thanks

gfranko commented 10 years ago

I think it has to do with the version of the jQueryUI Widget Factory you are using. Try updating the code to call SelectBoxIt methods like this:

$("#bedrooms").selectBoxIt('selectOption', '1');
Antera commented 10 years ago

It's working again, thank you so much