mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
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
This commit is contained in:
parent
6fcdff13fa
commit
6bbc43113c
2
ui/jquery.ui.button.js
vendored
2
ui/jquery.ui.button.js
vendored
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user