title: jQuery change image with select not working
body: <p>I am trying to do a simple image change on a dropdown, but I cannot get it working correctly for some reason, can anyone clue me in on what I am missing?</p>
  
  <p>The Jsfiddle <a href="http://jsfiddle.net/979vbv0j/" rel="nofollow">here</a> has the code.</p>
  
  <p>Thanks guys!</p>
  
  <pre><code>$("#display_avatar").change(function(){
      $("img[name=preview]").attr("src", $("option").attr("imagePath"));
      event.preventDefault();
  });
  
  &lt;img src="http://placehold.it/100/0000FF/000000" name="preview" /&gt;&lt;br /&gt;&lt;br /&gt;
  
  &lt;select class="form-control" name="display_avatar" id="display_avatar"&gt;
      &lt;option value="1" imagePath="http://placehold.it/100/cccccc/000000"&gt;First&lt;/option&gt;
      &lt;option value="2"imagePath="http://placehold.it/100/ghghgh/000000"&gt;Second&lt;/option&gt;
      &lt;option value="3"imagePath="http://placehold.it/100/5fgrty/000000"&gt;Third&lt;/option&gt;
      &lt;option value="4"imagePath="http://placehold.it/100/ff0000/000000"&gt;Fourth&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>