aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.core.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-12-14 11:13:46 -0500
committerScott González <scott.gonzalez@gmail.com>2012-12-14 11:13:50 -0500
commit8ec7a1b69ffd86edbef06e30ca4368600531e649 (patch)
treef1141afd8ad47e88261338907aadb35a0f1b9f18 /ui/jquery.ui.core.js
parent80e46c93a84c8720cbd4aa206c46e4ac2a2d84f7 (diff)
downloadjquery-ui-8ec7a1b69ffd86edbef06e30ca4368600531e649.tar.gz
jquery-ui-8ec7a1b69ffd86edbef06e30ca4368600531e649.zip
All: Use .addBack() instead of .andSelf().
Diffstat (limited to 'ui/jquery.ui.core.js')
-rw-r--r--ui/jquery.ui.core.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js
index 4ad4f8a09..694cb1bef 100644
--- a/ui/jquery.ui.core.js
+++ b/ui/jquery.ui.core.js
@@ -152,7 +152,7 @@ function focusable( element, isTabIndexNotNaN ) {
function visible( element ) {
return $.expr.filters.visible( element ) &&
- !$( element ).parents().andSelf().filter(function() {
+ !$( element ).parents().addBack().filter(function() {
return $.css( this, "visibility" ) === "hidden";
}).length;
}
@@ -227,6 +227,15 @@ if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
});
}
+// support: jQuery <1.8
+if ( !$.fn.addBack ) {
+ $.fn.addBack = function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter( selector )
+ );
+ };
+}
+
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
$.fn.removeData = (function( removeData ) {