The jquery Mobile includes an initialization event that can even be loaded before the Document.ready event in jquery. JQuery Mobile actually triggers its initialization event on the document object itself, and the first event that is triggered is mobileinit.
When jquery mobile begins to execute, he triggers the Mobileinit event on the Document object because the Mobileinit event is triggered immediately after loading, so you need to bind your event handler before the jquery mobile load. So I suggest that you arrange your JS reference order as follows
<script src= "Jquery.js" ></script>
<script src= "Your own JS file" ></script>
<script src = "Jquery-mobile.js" ></script>
To extend the Mobileinit event, you first need to bind it to a custom function. You can use the Bind method to extend the Mobileinit event to override the default configuration (Global option).
$ (document). Bind ("Mobileinit", function () {
//Overwrite Code
});
Within the function that binds the event, you can use the $.extend method of the $.mobile object to configure the default parameter values:
$ (document). Bind ("Mobileinit", function () {
$.extend ($.mobile, {
foo:bar
});
});
or set it individually.
$ (document). Bind ("Mobileinit", function () {
$.mobile.foo = bar;
});
The $.mobile object is the starting point for setting all properties
<script type= "Text/java script" src= "/scripts/jquery-1.6.min.js" ></script>
<script type= "text/" java Script ">
$ (document). Bind (" Mobileinit ", function () {
$.mobile.defaulttransition =" Slidedown ";
$.mobile.ajaxlinksenabled = false; Disable Ajax commit
$.mobile.ajaxformsenabled = false;//disable Ajax commit
$.mobile.ajaxenabled = false;//disable AJAX submission
} c12/></script>
<script type= "Text/java script" src= "/scripts/mobile/jquery.mobile-1.0b1.min.js" > </script>