I have the following code in jQuery Mobile. This code works fine when the page first loads, however if you navigate to this page it does nothing.
$('#dontKnowReg').click(function(){
if($(this).is(':checked')) {
$('#dontKnowRegDetails').slideDown();
} else {
$('#dontKnowRegDetails').slideUp();
}
});
I fixed a similar issue by changing the .click to .live but in this case it means the code doesnt work at all (even if i refresh the page). Thanks
$('#dontKnowReg').live('click', function () {
if($(this).is(':checked')) {
$('#dontKnowRegDetails').slideDown();
} else {
$('#dontKnowRegDetails').slideUp();
}
});