Javascript examples for jQuery:Selector
Disabling text selection using jquery
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.js"></script> <script type="text/javascript"> $(window).load(function(){//from ww w. j a va 2 s . c om $("#123").bind("selectstart", function (evt) { evt.preventDefault(); }); }); </script> </head> <body> <input id="123" value="Select this text, if you can"> </body> </html>