diff options
author | Felix Nagel <info@felixnagel.com> | 2012-08-30 22:57:37 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-08-30 22:57:37 +0200 |
commit | daadc84416d22eca651c85627d5dd683d7727d3e (patch) | |
tree | c52b8c3e89336d4d91e5a4aac8c298d472312c7a /ui/jquery.ui.core.js | |
parent | c1799024684780995ba666aa1c9acfa34c69f12a (diff) | |
parent | dec9c54632be191947c310b402810cf6f1b4250a (diff) | |
download | jquery-ui-daadc84416d22eca651c85627d5dd683d7727d3e.tar.gz jquery-ui-daadc84416d22eca651c85627d5dd683d7727d3e.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.core.js')
-rw-r--r-- | ui/jquery.ui.core.js | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js index 0e33f11ed..daa0c16e2 100644 --- a/ui/jquery.ui.core.js +++ b/ui/jquery.ui.core.js @@ -125,17 +125,6 @@ $.fn.extend({ $( this ).removeAttr( "id" ); } }); - }, - - disableSelection: function() { - return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + - ".ui-disableSelection", function( event ) { - event.preventDefault(); - }); - }, - - enableSelection: function() { - return this.unbind( ".ui-disableSelection" ); } }); @@ -268,6 +257,20 @@ $(function() { // deprecated + +$.fn.extend({ + disableSelection: function() { + return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + + ".ui-disableSelection", function( event ) { + event.preventDefault(); + }); + }, + + enableSelection: function() { + return this.unbind( ".ui-disableSelection" ); + } +}); + $.extend( $.ui, { // $.ui.plugin is deprecated. Use the proxy pattern instead. plugin: { @@ -285,7 +288,7 @@ $.extend( $.ui, { if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { return; } - + for ( i = 0; i < set.length; i++ ) { if ( instance.options[ set[ i ][ 0 ] ] ) { set[ i ][ 1 ].apply( instance.element, args ); @@ -293,24 +296,24 @@ $.extend( $.ui, { } } }, - + contains: $.contains, - + // only used by resizable hasScroll: function( el, a ) { - + //If overflow is hidden, the element might have extra content, but the user wants to hide it if ( $( el ).css( "overflow" ) === "hidden") { return false; } - + var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", has = false; - + if ( el[ scroll ] > 0 ) { return true; } - + // TODO: determine which cases actually cause this to happen // if the element doesn't have the scroll set, see if it's possible to // set the scroll @@ -319,7 +322,7 @@ $.extend( $.ui, { el[ scroll ] = 0; return has; }, - + // these are odd functions, fix the API or move into individual plugins isOverAxis: function( x, reference, size ) { //Determines when x coordinate is over "b" element axis |