https://github.com/jquery/jquery-mobile/issues#issue/578 Updated to use the selector that Scott suggested in order to make checkboxes not dissappear. One issue I noticed is that the page still transitions to the 'new' page even though it is really the same page. I have a fix for this that will post in a separate drop.

This commit is contained in:
Jesse Streb 2010-12-09 10:13:30 +08:00 committed by Scott Jehl
parent 1a21b0581c
commit 5b238ea1ce

View file

@ -11,7 +11,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
},
_create: function(){
var input = this.element,
label = $("label[for='" + input.attr( "id" ) + "']"),
label = $(input).closest("form,fieldset,[data-role='page']").find("label[for='" + input.attr( "id" ) + "']"),
inputtype = input.attr( "type" ),
checkedicon = "ui-icon-" + inputtype + "-on",
uncheckedicon = "ui-icon-" + inputtype + "-off";
@ -76,7 +76,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
refresh: function( ){
var input = this.element,
label = $("label[for='" + input.attr( "id" ) + "']"),
label = $(input).closest("form,fieldset,[data-role='page']").find("label[for='" + input.attr( "id" ) + "']"),
inputtype = input.attr( "type" ),
icon = label.find( ".ui-icon" ),
checkedicon = "ui-icon-" + inputtype + "-on",