Rebuild only one field instead of entire page?
Closed this issue · 1 comments
schellenbergk commented
It would be nice to target a specific element to rebuild floatLabels within instead of entire page (for optimization reasons). Is there a way to do that?
pryley commented
If using float-labels on multiple forms, why not initialise them independently? This will allow you to rebuild them independently of each other.
var floatlabels1 = new FloatLabels( '#form1' );
var floatlabels2 = new FloatLabels( '#form2' );
var floatlabels3 = new FloatLabels( '#form3' );
// do something
floatlabels2.rebuild();
Unless you want to be able to rebuild specific fields in a form. This would be trivial to implement, but I would need a good reason for adding such an extreme micro-optimisation to the codebase.