Event jQuery Select by Example

Learn jquery select() event by example. We take very simple example of select event.

jQuery select()

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.



It triggers a selected event for the selected elements.


Parameters of jQuery select() event

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

Let’s see example of jquery select event()

<!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>


Be First to Comment

Leave a Reply

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