Skip to content

Instantly share code, notes, and snippets.

@Rockncoder
Created March 12, 2013 13:40
Show Gist options
  • Select an option

  • Save Rockncoder/5142925 to your computer and use it in GitHub Desktop.

Select an option

Save Rockncoder/5142925 to your computer and use it in GitHub Desktop.
Hooking the "mobileinit" event. Note: the hook is before loading jQM.
<link href="content/jquery.mobile-1.3.0.min.css" rel="stylesheet" type="text/css" />
<!--<script src="libs/require.js" data-main="scripts/app.js"></script>-->
<script src="libs/jquery-1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
// Prevent jQM from handling <a> clicks and # changes
// IMPORTANT: This must be hooked before loading jQM
$(document).on("mobileinit", function () {
$.mobile.linkBindingEnabled = false;
$.mobile.hashListeningEnabled = false;
});
</script>
<script src="libs/jquery.mobile-1.3.0.min.js" type="text/javascript"></script>
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment