Turn off auto initialize

Description

The following code shows how to turn off auto initialize.

Example


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
body {<!--  ww w .  j  a va2s  . c o m-->
  visibility: visible !important;
}
</style>
</head>
<body>
  <link rel="stylesheet"
    href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
  <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
  <script>
$(document).on("mobileinit", function () {
    $.mobile.autoInitializePage = false;
});
</script>
  <script
    src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
  <a data-role="button" href="#">Click Me to Initialize </a>
  <script type='text/javascript'>
$('a').on("click", function () {
    $(this).parent().trigger("create");
}); 
</script>
</body>
</html>

Click to view the demo





















Home »
  jQuery Mobile »
    Example »




Button
Button Event
Button Icon
Button Text
Checkbox
Collapsible
Date
Dialog
Event
Footer
Form
Header
Icon
Input
Layout
Listview
Listview Divider
Listview Item
Loader
mobile_settings
Navbar
Page
Page Event
Popup
Radio
Select
Slider
Switch
Textarea
Theme