My html looks like this
<input type="search" id="starSearch" />
<img src="image.png" title="How to do this">
How can I change this script that will fill search field with image title attribute value?
I know this code, but it’s for links and innerHTML only
$(function(){
$('.special_field_link').live('click', function() {
$("#a_input_id").val($(this).html());
});
});
Demo : http://jsfiddle.net/gopalrohila/vzZ22/