marcj / jquery-selectBox

A jQuery plugin for replacing <select> elements.
http://marcj.github.io/jquery-selectBox/
549 stars 212 forks source link

Small fix for when selectbox destroyed #150

Closed bogdanRada closed 9 years ago

bogdanRada commented 10 years ago

This is a fix for this case:

-- If a selectbox is destroyed but in code you still use this code $('#element').selectBox('options', data) the select won't get changed with the new options

There might be better ways of dealing with this, but this fixed the issue for me. I hope you will find it useful

marcj commented 10 years ago

Mh, I'm not sure about that.

bogdanRada commented 10 years ago

here is a jsfiddle for this: http://jsfiddle.net/f4dm8/5/. My fix was for this case, that even if you destroy the selectbox, the new options should still appear in the dropdown.

bogdanRada commented 9 years ago

is there any chance of getting this merged? that would really be awesome :)

bogdanRada commented 9 years ago

@marcj , can you please take a look at this? would be really great if this could be merged . You can check that this issue is still happening by checking the JsFiddle i prepared for this. Please let me know your thoughts on this.

marcj commented 9 years ago

Thanks @bogdanRada!

bogdanRada commented 9 years ago

thank you also :)