Skip to content
A jQuery plugin which disables text selection on any element. Useful for UI elements; evil for pretty much everything else.
JavaScript
Find file
Latest commit 51bac1d Jan 11, 2012 @mathiasbynens Merge branch 'master' of github.com:mathiasbynens/jquery-noselect
* 'master' of github.com:mathiasbynens/jquery-noselect:
  README: Add JavaScript syntax highlighting

README.md

noSelect jQuery Plugin

This plugin disables text selection for any element you specify. This can be useful when dealing with UI elements sometimes.

As featured in Uniform — Sexy forms with jQuery.

Demo & Examples

http://mathiasbynens.be/demo/noselect

Example Usage

$('p.with-click-handler').noSelect();

Notes

Please do not use this plugin to disable text selection on entire documents. That’s just annoying.

Mathias

Something went wrong with that request. Please try again.