Skip to content
Permalink
Browse files
Button: avoid .last() call to ensure compatibility with jQuery 1.3. F…
…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 6bbc43113ccd2722919e4149248c3316c143b287
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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 ) {

0 comments on commit 6bbc431

Please sign in to comment.