| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
( function( factory ) { |
| 17 |
"use strict"; |
| 18 |
|
| 19 |
if ( typeof define === "function" && define.amd ) { |
| 20 |
|
| 21 |
|
| 22 |
define( [ "jquery", "./version" ], factory ); |
| 23 |
} else { |
| 24 |
|
| 25 |
|
| 26 |
factory( jQuery ); |
| 27 |
} |
| 28 |
} )( function( $ ) { |
| 29 |
"use strict"; |
| 30 |
|
| 31 |
return $.fn.extend( { |
| 32 |
disableSelection: ( function() { |
| 33 |
var eventType = "onselectstart" in document.createElement( "div" ) ? |
| 34 |
"selectstart" : |
| 35 |
"mousedown"; |
| 36 |
|
| 37 |
return function() { |
| 38 |
return this.on( eventType + ".ui-disableSelection", function( event ) { |
| 39 |
event.preventDefault(); |
| 40 |
} ); |
| 41 |
}; |
| 42 |
} )(), |
| 43 |
|
| 44 |
enableSelection: function() { |
| 45 |
return this.off( ".ui-disableSelection" ); |
| 46 |
} |
| 47 |
} ); |
| 48 |
|
| 49 |
} ); |