Posted By


mattlowden on 03/22/11

Tagged


Statistics


Viewed 75 times
Favorited by 0 user(s)

disableSelection


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $.fn.disableSelection = function() {
  2. $(this).attr('unselectable', 'on')
  3. .css('-moz-user-select', 'none')
  4. .each(function() {
  5. this.onselectstart = function() { return false; };
  6. });
  7. };

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.