CreativeIT / getmdl-select

Select for material-design-lite
http://creativeit.github.io/getmdl-select/
MIT License
301 stars 87 forks source link

Register Event Listener with jquery "on" #68

Closed midnight-blue closed 6 years ago

midnight-blue commented 6 years ago

It seems to me that changes on the current input of getmdl-select can only be registered using the jquery "change" function. Event Listeners registered using the jquery "on" function are not triggered on input change. Is this the intended behavior?

Example: https://jsfiddle.net/xv8tmzuk/1/

It would be great if you could give some feedback on this. Thx!

alexbananabob commented 6 years ago

Seems like you have different selectors: $('#country').change and $('#wrapper').on

AlphaJuliettOmega commented 6 years ago

Neither of those in OP's comment work, both fields stay blank when an item is selected.

When I run the JSFiddle nothing happens when I select an item, the same way, I'm struggling to attach a listener on the hidden input.

It just doesn't trigger and I don't know why.

uudruid74 commented 5 years ago

This needs to be re-opened. Setting both to #country, which is the input field being tested, still fails. How do we get notified of the change?