I have a page with several JQuery autocompletes. I have implemented a button to clear all selected values, but it does not work... I have tried to set $(...).text("");
but it does not work. Firebugs fails on the line and does not throw any error message. It quits the function.
What is the right way to clear the selected value of JQuery autocompletes, from code?
You should use:
$('selector').autocomplete('close').val('');
This will also reset the current search of the autocomplete (in addition to clearing the input).
Try using $(...).attr("value","");
Hope it works!! Sorry if i have misunderstood the question.
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