I have a jquery mobile webapp and I'm trying to hide certain fields from the user unless they check a checkbox. It's not working though. Here is what I have so far:
<script type="text/javascript">
$(document).ready(function() {
$('#mycheckbox').change(function() {
$('#mycheckboxdiv').toggle();
});
});
</script>
<fieldset data-role="controlgroup">
<input type="checkbox" name="mycheckbox" id="mycheckbox" value="0" />
</fieldset>
<div id="mycheckboxdiv" style="display:none">
This content should appear when the checkbox is checked
</div>
nothing happens when I check the box.