Javascript examples for jQuery Method and Property:select
Attach a function to the select event:
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("input").select(function(){ $("input").after(" Text marked!"); });/*from w w w . ja v a 2 s. co m*/ }); </script> </head> <body> <p>Select some text inside the input field.</p> <input type="text" value="Hello World"> </body> </html>