jQuery select | Two examples of using select method

jQuery select

As some text is selected inside a text box or text area of your web page, the jQuery select event occurs. You can use the jQuery select method to perform some action as the select event occurs.

Syntax of using select method

The simple syntax of using select jQuery method is:


A select method example

This example shows when the jQuery select event occurs inside a text box, an alert will be shown by using the select method. For the select event to occur, select some text inside the text field.

Experience this example online

Example of select method in text area

The following example shows select method triggering an alert as the select event occurs inside text area field by using the select method of jQuery. For the select event to happen, select some text inside the textarea.

Experience this example online


Also see jQuery slide | jQuery events

Was this article helpful?

Related Articles

Leave A Comment?