ok( group.find( "label" ).is( ".ui-button" ) );
});
+test( "#7534 - Button label selector works for ids with \":\"", function() {
+ var group = $( "<span><input type='checkbox' id='check:7534'><label for='check:7534'>Label</label></span>" );
+ group.find( "input" ).button();
+ ok( group.find( "label" ).is( ".ui-button" ), "Found an id with a :" );
+});
+
})( jQuery );
// we don't search against the document in case the element
// is disconnected from the DOM
var ancestor = this.element.parents().last(),
- labelSelector = "label[for=" + this.element.attr("id") + "]";
+ labelSelector = "label[for='" + this.element.attr("id") + "']";
this.buttonElement = ancestor.find( labelSelector );
if ( !this.buttonElement.length ) {
ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();