We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f0710d commit 55dc0bbCopy full SHA for 55dc0bb
ui/jquery.ui.checkbox.js
@@ -19,8 +19,16 @@ $.widget( "ui.checkbox", {
19
20
_create: function() {
21
22
+ // find the checkbox's label
23
this.labelElement = $( this.element[0].ownerDocument ).find( "label[for=" + this.element.attr("id") + "]" );
24
25
+ // move the checkbox outside (before) the label if it's inside it
26
+ if ( this.labelElement.has(this.element).length ) {
27
+ this.element.insertBefore( this.labelElement );
28
+ }
29
+
30
+ // wrap the checkbox in a new div
31
+ // move the checkbox's label inside the new div
32
this.checkboxElement = this.element.wrap( "<div></div>" ).parent()
33
.addClass("ui-checkbox")
34
.append(this.labelElement);
0 commit comments