Skip to content

Commit

Permalink
Button: avoid .last() call to ensure compatibility with jQuery 1.3. F…
Browse files Browse the repository at this point in the history
…ixed #7089 - Button: .last() used in ui.button but not exists in jQ 1.3
  • Loading branch information
rdworth committed Mar 14, 2011
1 parent 6fcdff1 commit 6bbc431
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/jquery.ui.button.js
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 6bbc431

Please sign in to comment.