change source of an image with select box and jQuery


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $("#item_select").change(function(){
  2. var select_val
  3. select_val = $("#item_select").val();
  4. $("img#yourimg").attr("src", select_val);
  5. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.