Closed FANMixco closed 5 years ago
What's the solution here? doing $('#sample1').val('NewValue')
creates a resetting behavior for the dropdown.
My approach:
$('...selector for your <li> item').click()
This invokes all the changed .data(), .val() and .className changes that needed to be done
What's the solution here? doing
$('#sample1').val('NewValue')
creates a resetting behavior for the dropdown.My approach:
$('...selector for your <li> item').click()
This invokes all the changed .data(), .val() and .className changes that needed to be done
My question is more related to is it possible more than a bug, let's take the basic example:
http://creativeit.github.io/getmdl-select/
How could I select a value after it's loaded? Because I can see it's possible to do it before with data-selected="true":
But I cannot find how to re-select it after it's done, I tried something like this with jQuery:
$($('.mdl-menu__item')[1]).data("selected", "true")
Thanks for any idea.