aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-07-29 14:57:06 -0400
committerScott González <scott.gonzalez@gmail.com>2011-07-29 14:57:06 -0400
commitb796cc57bd1eb0557849ece88c5794b70656f5cd (patch)
treea62f6d04b43aacf9931bba56785d9fa7e6248cbf /ui
parent4b17402262f917cfd7b49b43151925aadf8880e4 (diff)
downloadjquery-ui-b796cc57bd1eb0557849ece88c5794b70656f5cd.tar.gz
jquery-ui-b796cc57bd1eb0557849ece88c5794b70656f5cd.zip
jQuery 1.6 support.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.autocomplete.js2
-rw-r--r--ui/jquery.ui.button.js18
-rw-r--r--ui/jquery.ui.core.js2
-rw-r--r--ui/jquery.ui.dialog.js2
-rw-r--r--ui/jquery.ui.slider.js4
5 files changed, 15 insertions, 13 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index 62fb782df..4b332d5a6 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -48,7 +48,7 @@ $.widget( "ui.autocomplete", {
"aria-haspopup": "true"
})
.bind( "keydown.autocomplete", function( event ) {
- if ( self.options.disabled || self.element.attr( "readonly" ) ) {
+ if ( self.options.disabled || self.element.propAttr( "readOnly" ) ) {
return;
}
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 1e1d04097..2fac87cea 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -56,7 +56,7 @@ $.widget( "ui.button", {
.bind( "reset.button", formResetHandler );
if ( typeof this.options.disabled !== "boolean" ) {
- this.options.disabled = this.element.attr( "disabled" );
+ this.options.disabled = this.element.propAttr( "disabled" );
}
this._determineButtonType();
@@ -153,7 +153,7 @@ $.widget( "ui.button", {
return false;
}
$( this ).addClass( "ui-state-active" );
- self.buttonElement.attr( "aria-pressed", true );
+ self.buttonElement.attr( "aria-pressed", "true" );
var radio = self.element[ 0 ];
radioGroup( radio )
@@ -162,7 +162,7 @@ $.widget( "ui.button", {
return $( this ).button( "widget" )[ 0 ];
})
.removeClass( "ui-state-active" )
- .attr( "aria-pressed", false );
+ .attr( "aria-pressed", "false" );
});
} else {
this.buttonElement
@@ -272,9 +272,9 @@ $.widget( "ui.button", {
$.Widget.prototype._setOption.apply( this, arguments );
if ( key === "disabled" ) {
if ( value ) {
- this.element.attr( "disabled", true );
+ this.element.propAttr( "disabled", true );
} else {
- this.element.removeAttr( "disabled" );
+ this.element.propAttr( "disabled", false );
}
return;
}
@@ -291,22 +291,22 @@ $.widget( "ui.button", {
if ( $( this ).is( ":checked" ) ) {
$( this ).button( "widget" )
.addClass( "ui-state-active" )
- .attr( "aria-pressed", true );
+ .attr( "aria-pressed", "true" );
} else {
$( this ).button( "widget" )
.removeClass( "ui-state-active" )
- .attr( "aria-pressed", false );
+ .attr( "aria-pressed", "false" );
}
});
} else if ( this.type === "checkbox" ) {
if ( this.element.is( ":checked" ) ) {
this.buttonElement
.addClass( "ui-state-active" )
- .attr( "aria-pressed", true );
+ .attr( "aria-pressed", "true" );
} else {
this.buttonElement
.removeClass( "ui-state-active" )
- .attr( "aria-pressed", false );
+ .attr( "aria-pressed", "false" );
}
}
},
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js
index 59fa4d73a..1ca2c6f69 100644
--- a/ui/jquery.ui.core.js
+++ b/ui/jquery.ui.core.js
@@ -58,6 +58,8 @@ $.extend( $.ui, {
// plugins
$.fn.extend({
+ propAttr: $.fn.prop || $.fn.attr,
+
_focus: $.fn.focus,
focus: function( delay, fn ) {
return typeof delay === "number" ?
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index 2594a4b28..af08e1b76 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -306,7 +306,7 @@ $.widget("ui.dialog", {
//Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
// http://ui.jquery.com/bugs/ticket/3193
- saveScroll = { scrollTop: self.element.attr('scrollTop'), scrollLeft: self.element.attr('scrollLeft') };
+ saveScroll = { scrollTop: self.element.scrollTop(), scrollLeft: self.element.scrollLeft() };
$.ui.dialog.maxZ += 1;
self.uiDialog.css('z-index', $.ui.dialog.maxZ);
self.element.attr(saveScroll);
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index f0b01d7c0..457362577 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -502,10 +502,10 @@ $.widget( "ui.slider", $.ui.mouse, {
if ( value ) {
this.handles.filter( ".ui-state-focus" ).blur();
this.handles.removeClass( "ui-state-hover" );
- this.handles.attr( "disabled", "disabled" );
+ this.handles.propAttr( "disabled", true );
this.element.addClass( "ui-disabled" );
} else {
- this.handles.removeAttr( "disabled" );
+ this.handles.propAttr( "disabled", false );
this.element.removeClass( "ui-disabled" );
}
break;