How to use Event Select() Method in JQuery
In this article I am going to explain about event select() method in jquery.
jQuery Event Select() Method
jquery event select() method triggers to select event and select event occurs when we select to text in any text area or in input area in document.
Syntax
$(selectElement).select()
|
Example
In this example when we will selected to text then a message will be display "Text has been selected...".
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("input").select(function () {
$("input").after("Text has been selected.....");
});
});
</script>
</head>
<body>
<input type="text" name="Abc" value="Hello Friends" />
<h4>
Select to input text</h4>
</body>
</html>
|
Output
You may also want to read these related articles: here
Ask Your Question
Got a programming related question? You may want to post your question here