material design lite - How to focus an MDL TextField -


what proper way focus material design lite textfield?

this works:

$("#mytextfield").focus(); 

this not work:

document.getelementbyid('mytextfield').parentnode.materialtextfield.focus(); 

however, similar code works disable textfield:

document.getelementbyid('mytextfield').parentnode.materialtextfield.disable(); 

you don't need jquery.

  input.focus();   input.parentnode.classlist.add('is-dirty'); 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -