aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.button.js
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2011-03-14 17:18:35 -0400
committerRichard Worth <rdworth@gmail.com>2011-03-14 17:18:35 -0400
commit6bbc43113ccd2722919e4149248c3316c143b287 (patch)
treeab8937b92d2880d2a155653f57188fe0eee71109 /ui/jquery.ui.button.js
parent6fcdff13fa4a14dd5427f71f83727b87520349fb (diff)
downloadjquery-ui-6bbc43113ccd2722919e4149248c3316c143b287.tar.gz
jquery-ui-6bbc43113ccd2722919e4149248c3316c143b287.zip
Button: avoid .last() call to ensure compatibility with jQuery 1.3. Fixed #7089 - Button: .last() used in ui.button but not exists in jQ 1.3
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r--ui/jquery.ui.button.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 56e0d2d22..bddedead6 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -200,7 +200,7 @@ $.widget( "ui.button", {
if ( this.type === "checkbox" || this.type === "radio" ) {
// we don't search against the document in case the element
// is disconnected from the DOM
- var ancestor = this.element.parents().last(),
+ var ancestor = this.element.parents().filter(":last"),
labelSelector = "label[for=" + this.element.attr("id") + "]";
this.buttonElement = ancestor.find( labelSelector );
if ( !this.buttonElement.length ) {