How to choose defoltnoy value in jquery autocomplette?
Hello! There is a list of jquery autocomplette in which loaded countries when you enter. In General the subject such as to simulate the choice of a country from the listwithout input from the user? i.e. that the choice was automatic. Who knows?
1-step see this: $( "#org_country" ).autocomplete( "search", "Russia" );
Finds in the list.
2-step: AND NOW to CHOOSE IT?
It turns out I need to simulate a select event on the found item, and how to do it?
1 answer
It is not entirely clear what will depend on the default selection (string constant comes from the outside, in principle, does not matter), but it is possible so:
$("#org_country").val("Russia");
And then look at the select, for example, and whether the access control from the user, or is our "default value"
Find more questions by tags HTMLjQuery