jquery mobile checkbox

bamapie
bamapie used Ask the Experts™
on
My jquery mobile checkbox:

<input type="checkbox" id="chkboxRememberMe" /><label for="chkboxRememberMe">Keep me logged in</label>

Open in new window


is disabled by default.  That is, when it's rendered, it already contains the class "ui-checkbox-off":

<div class="RememberMe">
      <div class="ui-checkbox">
	<label class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-checkbox-off" for="chkboxRememberMe">Keep me logged in</label>
	<input id="chkboxRememberMe" type="checkbox">
	</div>
</div>

Open in new window


Why is this?  It's unusable.  How do I make it enabled by default?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2013
Awarded 2012
Commented:
Hi,
afaik is the class "ui-checkbox-off" not responsible to disable a checkbox - it is just for visualization.

Could it be that there is another JavaScript / jQuery code on that page which disables the checkbox?

Could you perhaps provide more (complete) code?

Thanks and HTH
Rainer
Did you try checkboxon? if not;

<div class="RememberMe">
      <div class="ui-checkbox">
	<label class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-checkbox-on" for="chkboxRememberMe">Keep me logged in</label>
	<input id="chkboxRememberMe" type="checkbox">
	</div>
</div>

Open in new window


Else it might be issue with jquery/css...

Author

Commented:
Something was off.  I ended up just getting new themes from the themeroller for JQM, and everything just righted itself.

Per Rainer, somewhere, I just had some kind of mod that was jacking with this.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial