jQuery Mobile: document ready vs. page events

I am using jQuery Mobile, and I am having trouble understanding differences between classic document ready and jQuery Mobile page events. What is the real difference? Why should <!– language: lang-js –> $(document).ready() { }); be better than $(document).on(‘pageinit’) { }); What is the order of page events, when you transition from one page to … Read more

How can I check if a checkbox is checked?

I am building a mobile web app with jQuery Mobile and I want to check if a checkbox is checked. Here is my code. <script type=text/javascript> function validate(){ if (remember.checked == 1){ alert(“checked”) ; } else { alert(“You didn’t check it! Let me check it for you.”) } } </script> <input id=”remember” name=”remember” type=”checkbox” onclick=”validate()” … Read more