jQuery select()jQuery select event occurs when a text is marked or selected in text area or a text field. This event is limited to fields and Syntax: |
It triggers the select event for selected elements.
It adds a function to the select event.
Parameter | Description |
---|---|
Function | It is an optional parameter. It is used to specify the function to run when the select event is executed. |
Let's take an example to demonstrate jQuery select() event.
Output:
Select the text on the box: click and drag the mouse to select text.