I need some help finding a jQuery plugin which will allow me to display an image preview from a select list of images - onfocus/onchange..
Example:
<select name="image" id="image" class="inputbox" size="1">
<option value=""> - Select Image - </option>
<option value="image1.jpg">image1.jpg</option>
<option value="image2.jpg">image2.jpg</option>
<option value="image3.jpg">image3.jpg</option>
</select>
<div id="imagePreview">
displays image here
</div>
Has anyone come across something like this? I've tried searching for it to no avail..
Thank you!
I'm not sure you need a plugin to deal with this:
$(document).ready(function() {
$("#image").change(function() {
var src = $(this).val();
$("#imagePreview").html(src ? "<img src='" + src + "'>" : "");
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With