Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
140
rated 0 times [  142] [ 2]  / answers: 1 / hits: 16491  / 14 Years ago, mon, july 26, 2010, 12:00:00

I'm looking for a jQuery image picker plugin that allows me to do the following:




  1. Display a group of images and let the user select one (and only one) by clicking it

  2. If the user does not like any of the specified images, he should be able to upload his own



Just #1 would suffice, as I can add the code for #2 if necessary



It's not that difficult to do I know, but if there is a standard plugin that people use for this, I'd rather use that than reinvent the wheel.


More From » jquery

 Answers
12

Something like this? i dont know if there is plugin but is seems really simple



// HTML
<div id=image_container>
<img src=blabla />
<img src=blabla />
...
</div>
<form ...>
<input id=image_from_list name=image_from_list type=hidden value= />
<input id=image_from_file name=image_from_file type=file />
</form>
// JS
$('div#image_container img').click(function(){
// set the img-source as value of image_from_list
$('input#image_from_list').val( $(this).attr(src) );
});

[#96102] Friday, July 23, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dylondarrianb

Total Points: 48
Total Questions: 109
Total Answers: 104

Location: Zambia
Member since Thu, Jun 25, 2020
4 Years ago
;