jQuery Event - select() Method
Example
Add text after the text field to display the prompt text:
$("input").select(function(){ $("input").after(" Text marked!"); });
Definition and Usage
The select event occurs when text in a textarea or text-type input element is selected.
The select() method triggers the select event or specifies the function to be executed when the select event occurs.
Bind the function to the select event
Syntax
$().select(function)
Parameter | Description |
---|---|
function | Optional. Specifies the function to be executed when a select event occurs. |