css - Make materialize labels move out of input box when input box is filled via javascript -


normally, materialize, labels text input boxes show inside input boxes until user enter selects box , enters text in it. however, when box's value filled via javascript, label not move out of way. stays in box , overlaps text entered. there way trigger label transition javascript well, doesn't happen?

more specifically, if using materialize in rails turbolinks enabled, find materialize form fields prefilled non-empty values not active on page load.

the following method worked me:

$(function() {     materialize.updatetextfields(); }); 

it add class 'active' both corresponding labels , prefix icons.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -