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
Post a Comment