Closed st-keller closed 10 years ago
Please close this - works like a charm (i found a bug in my html-code, that caused that behavior).
Great work - Thanks!
I'm glad it's working for you. Let me know if you find any issues with it.
show-html
is not really needed though, I only have that to use a separate plugin to display the real HTML of the select element on the doc page.
For anyone else stumbling upon this issue, you're probably missing the first empty option that should be included in you select, as per the documentation:
<select class="image-picker">
<option value=""></option>
<option data-img-src="http://placekitten.com/300/200" value="1">Cute Kitten 1</option>
<option data-img-src="http://placekitten.com/150/200" value="2">Cute Kitten 2</option>
<option data-img-src="http://placekitten.com/400/200" value="3">Cute Kitten 3</option>
</select>
The first <option value=""></option>
is required to resolve this issue.
Hi if i Initialize image-picker by calling
$("select").imagepicker()
the first image is always selected.It would be very cool, if image-picker could keep the selection (third image in this example):
How can I achieve this?