How to clear div append results formed during Jquery Autocomplete -
i using jquery auto complete our application .
the issue facing results captured during auto complete aren't being cleared . (the data being added div cleardiv)
when tried clear manually on click of button ,, auto complete functionality isn't working .
<input type='text' title='tags' id='tags' /> <div class="autosearch_result_wrap" id="tags_result"></div> <input type="button" id="cleardiv" value="clear" name="clear"><br> $(document).ready(function() { var atags = ["ask","always", "all", "alright", "one", "foo", "blackberry", "tweet","force9", "westerners", "sport"]; $( "#tags" ).autocomplete({ source: atags , minlength: 2, appendto: "#tags_result", }); $(document).on('click', '#cleardiv', function(event) { $('#tags_result').empty(); }); });
could please let me know how resolve ??
i using chrome , tags clear leave textbox. browser using?
try test
$('#cleardiv').on('click', function(event) { $('#tags').blur(); });
Comments
Post a Comment