Jquery mobile mobileinit event not firing

Because Jquery mobile mobileinit event is triggered when mobile jquery starts to load then event listener must be binded before execution reach to loading jquery mobile javascript file.

Usually mobileinit event is binded using selector $ from jquery like this:

$(document).bind("mobileinit",onMobileInit);

This dictates JS files loading sequence in PhoneGap and websites to be something like:

<script src="jquery.js"></script>
<script src="custom-scripting.js"></script>
<script src="jquery-mobile.js"></script>

Here binding to mobileinit is done inside custom-scripting.js


1 thought on “Jquery mobile mobileinit event not firing

Leave a Reply

Your email address will not be published.


*