Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 83765f0

Browse files
author
sgrebnov
committed
checkboxradio control improvements
1 parent 59abc6f commit 83765f0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

js/jquery.mobile.forms.checkboxradio.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
5151
});
5252

5353
// Wrap the input + label in a div
54-
input.add( label )
55-
.wrapAll( "<div class='ui-" + inputtype + "'></div>" );
54+
var wrapper = document.createElement('div');
55+
wrapper.setAttribute('class','ui-'+inputtype);
56+
input[0].parentNode.insertBefore(wrapper,input[0]);
57+
wrapper.appendChild(input[0]);
58+
wrapper.appendChild(label[0]);
5659

5760
label.bind({
5861
vmouseover: function( event ) {

0 commit comments

Comments
 (0)