aboutsummaryrefslogtreecommitdiffstats
path: root/ui/core.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/core.js')
-rw-r--r--ui/core.js37
1 files changed, 1 insertions, 36 deletions
diff --git a/ui/core.js b/ui/core.js
index 6c948d058..412354151 100644
--- a/ui/core.js
+++ b/ui/core.js
@@ -22,11 +22,11 @@
"jquery",
"./data",
"./disable-selection",
- "./escape-selector",
"./focusable",
"./form",
"./ie",
"./keycode",
+ "./labels",
"./version"
], factory );
} else {
@@ -113,41 +113,6 @@ $.fn.extend( {
$( this ).removeAttr( "id" );
}
} );
- },
-
- labels: function() {
- var ancestor, selector, id, labels, ancestors;
-
- // Check control.labels first
- if ( this[ 0 ].labels && this[ 0 ].labels.length ) {
- return this.pushStack( this[ 0 ].labels );
- }
-
- // Support: IE <= 11, FF <= 37, Android <= 2.3 only
- // Above browsers do not support control.labels. Everything below is to support them
- // as well as document fragments. control.labels does not work on document fragments
- labels = this.eq( 0 ).parents( "label" );
-
- // Look for the label based on the id
- id = this.attr( "id" );
- if ( id ) {
-
- // We don't search against the document in case the element
- // is disconnected from the DOM
- ancestor = this.eq( 0 ).parents().last();
-
- // Get a full set of top level ancestors
- ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );
-
- // Create a selector for the label based on the id
- selector = "label[for='" + $.ui.escapeSelector( id ) + "']";
-
- labels = labels.add( ancestors.find( selector ).addBack( selector ) );
-
- }
-
- // Return whatever we have found for labels
- return this.pushStack( labels );
}
} );