-
Notifications
You must be signed in to change notification settings - Fork 72
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
How do i set a value for a selectMenu programtically? #30
Comments
like this: <select id="uniqueId" class="select-menu">
<option value="1" selected>Item 1</option>
<option value="2" >Item 2</option>
<option value="3" >Item 3</option>
</select> |
Problem is if I change the select value programmtically the UI doesn't update it and shows the old value:
|
Any ideas? |
Ok, I created the following function to change a select dynamically.
It uses jQuery, but can be rewritten using pure JS. |
I want my UI to load with defaults, and I'm trying to set the value of the select, but it doesn't work:
directionMenu.value = defaults.direction;
is there another way?
thanks
Idan
The text was updated successfully, but these errors were encountered: