Handle text input selection event
Description
The following code shows how to handle text input selection event.
Example
<html>
<head>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {<!--from www .j a va 2 s.co m-->
$(":input").select(function() {
$("div").text("selected");
});
});
</script>
</head>
<body>
<input type="text" value="Some text" />
<div></div>
</body>
</html>