Shows text over an input that disappears when the user clicks into it. The text remains hidden if the user adds a value.
new OverText(input[, options]);
Hides the overtext element for a given input.
myOverText.hide();
Shows the overtext element for a given input.
myOverText.show();
Focuses the input and hides the overtext.
Repositions the overtext element over a the input.
myOverText.reposition();
Begins repeatedly polling the input to position and show (or hide) the over text. Useful for login fields that are often autofilled by browsers.
Cancels the polling of the input.
These method calls are made against the OverText namespace (not instances of OverText) and apply their actions to all running instances.
This allows you to manually re-assert the positioning and visibility of all the OverTexts on the page.
OverText.update();
This method is NOT a method on the instance. Rather it is on the namespace. So:
var myOverText_1 = new OverText(...); var myOverText_2 = new OverText(...); //...later OverText.update(); //updates all the instances of OverText
This allows you to manually hide all the OverTexts on the page.
OverText.hideAll();
This method is NOT a method on the instance. Rather it is on the namespace. So:
var myOverText_1 = new OverText(...); var myOverText_2 = new OverText(...); //...later OverText.hideAll(); //hides all the instances of OverText
This allows you to manually show all the OverTexts on the page.
OverText.showAll();
This method is NOT a method on the instance. Rather it is on the namespace. So:
var myOverText_1 = new OverText(...); var myOverText_2 = new OverText(...); //...later OverText.showAll(); //updates all the instances of OverText
Extends the native Element object with a reference to its OverText instance.
myInput.retrieve('OverText'); //the instance of OverText for the element
This documentation is released under a Attribution-NonCommercial-ShareAlike 3.0 License.