Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-selected value updated on input? #96

Open
sarceda opened this issue Jul 4, 2016 · 0 comments
Open

Auto-selected value updated on input? #96

sarceda opened this issue Jul 4, 2016 · 0 comments

Comments

@sarceda
Copy link

sarceda commented Jul 4, 2016

Sometimes, my users have a default value saved on their SESSIONS. I want to pre-fill the country selector with that value.

This is what I tried so far:

$('#filters_geo').selectToAutocomplete({'real-value':''});


Edit: I got it working now. This is my solution (feel free to correct it if you think there's a more simple way to do it)

var $getCountry = $('#filters_geo option[value=""]').text();
$(".ui-autocomplete-input").val($getCountry);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant