jQuery Select Event Method

jQuery select event method; Through this tutorial, i am going to show you what is jquery select() event method and how to use it with HTML elements.

jQuery Select Event Method

The select event occurs when a text is selected (marked) in the text field or text field. This event is limited to the field and box. When the select occurs, the select() method encloses a function to run.

Syntax jQuery Select Event Method


It triggers a selected event for the selected elements.


Parameters of jQuery Select Event Method

FunctionIt is an optional parameter. It is used to specify the function to run when the select event is executed.

Example of jQuery Select Event Method

<!DOCTYPE html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    alert("Text marked!");
<input type="text" value="Hello World">
<p>Select some text inside the input field.</p>

Demo of jQuery Select Event Method

Select some text inside the input field.

Recommended jQuery Tutorials

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *