How to use jQuery .select() to handle select event on HTML <input> element

1 Answer

0 votes
<!doctype html>
<html>
<head>
  <script src="js/jquery/1.11.3/jquery.min.js"></script>
</head>
<body>

<form>
  <input id="id-fname" type="text" value="some text">
</form>
<script>
$( "#id-fname" ).select(function() {
  alert( "Handler for .select() called" );
});
</script>
</body>
</html>

 



answered Aug 22, 2016 by avibootz
...