Guest User

Copy box firefox

a guest
Mar 1st, 2019
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. element
  2.                 .bind('mouseover', function() {
  3.                     var selection = $window.getSelection();
  4.                     var range = $document[0].createRange();
  5.  
  6.                     range.selectNodeContents(this);
  7.                     selection.removeAllRanges();
  8.                     selection.addRange(range);
  9.                 })
  10.                 .bind('mouseout', function() {
  11.                     $window.getSelection().removeAllRanges();
  12.                 })
  13.                 .bind('mousedown', function(event) {
  14.                     event.preventDefault();
  15.                     event.stopPropagation();
  16.  
  17.                     return false;
  18.                 })
Advertisement
Add Comment
Please, Sign In to add comment