I've been looking and looking for an error here as I can't clear the input #keywordsearch when clicking on the reset button in my HTML. However, I can't find anything - can you see an issue?
http://jsfiddle.net/eKWyY/
Here's my JS:
$('#dirreset').click(function() {
$('#fatform option').each(function(index) {
$(this).removeAttr("selected");
});
$('#keywordsearch').val('');
});
Thanks for any help, it's driving me a bit mad!
Osu
Clicking Reset button, the entries are reset to the default values. And asf
is your default value, so it wont clear, So change
<input type="reset" name="osu_directory_search_reset" value="Reset" id="dirreset">
to
<input type="button" name="osu_directory_search_reset" value="Reset" id="dirreset">
Demo: jsFiddle
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