jQuery select text event function - select() method With Example

jQuery select() method triggers when a text in the text field or text area is selected. This method attaches a handler, which executes when the selected event is fired.

The syntax for using jQuery select():

This signature is used without any arguments

The handler is a function, which is executed when the text inside the <text area> or <input type=”text”> gets selected.

jQuery select() function example

Following example demonstrates select() method usage.


In this example, you can see that the select() method is triggered when you select the text in the input field. When you select the text, the function attached to the select() method is executed and a text is displayed below the input field and fades out. This is how select() method works in the jquery.

You can try it yourself by selecting the text in the below text box.

By admin

Leave a Reply

%d bloggers like this: