// deprecated
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
-$.support.selectstart = "onselectstart" in document.createElement( "div" );
$.fn.extend({
focus: (function( orig ) {
return function( delay, fn ) {
};
})( $.fn.focus ),
- disableSelection: function() {
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
- ".ui-disableSelection", function( event ) {
+ disableSelection: (function() {
+ var eventType = "onselectstart" in document.createElement( "div" ) ?
+ "selectstart" :
+ "mousedown";
+
+ return function() {
+ return this.bind( eventType + ".ui-disableSelection", function( event ) {
event.preventDefault();
});
- },
+ };
+ })(),
enableSelection: function() {
return this.unbind( ".ui-disableSelection" );