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

Get selected image via jquery #31

Closed ChristianGiupponi closed 10 years ago

ChristianGiupponi commented 10 years ago

How can I get the selected image?

lloiser commented 10 years ago
$("select").data("picker").selected_values()
rvera commented 10 years ago

Yep, that's right.

easytraxbd commented 4 years ago

I am getting error Uncaught TypeError: Cannot read property 'selected_values' of undefined

IvanML19 commented 4 years ago

I am getting error Uncaught TypeError: Cannot read property 'selected_values' of undefined

probably you are using an incorrect selector. the selector ' $("select") ' is generic. you should use your selector (by ID, class, etc...)

Humni commented 4 years ago

@IvanML19 how to do this is in the docs http://rvera.github.io/image-picker/