rvera / image-picker

Image Picker is a simple jQuery plugin that transforms a select element into a more user friendly graphical interface.
http://rvera.github.com/image-picker
Other
906 stars 216 forks source link

picker should throw 'change' event #2

Closed larsbo closed 11 years ago

larsbo commented 11 years ago

i want to use the selected option immediately in my javascript and tried to listen for a change event with jquery, but it image-picker doesn't throw one :(

i added this at line 185 and it works fine (perhaps it should be also added to line 183):

picker.select.change();
rvera commented 11 years ago

I've been working on this same feature, I'm just not sure if it should fire an event or do a callback function that you can pass at the initialization.

I'm leaning towards the callback since you can always subscribe to an event on the original select element. Should be up during the week.

larsbo commented 11 years ago

that sounds great :)