Permalink
Browse files

add linkBindingEnabled to mobile object for complex apps that want to…

… handle all nav
  • Loading branch information...
johnbender committed Oct 20, 2011
1 parent 0a84a9e commit 8f5889a70746f6859db58ab361198680242e09a0
Showing with 9 additions and 2 deletions.
  1. +4 −1 js/jquery.mobile.core.js
  2. +5 −1 js/jquery.mobile.navigation.js
View
@@ -32,6 +32,9 @@
// Automatically load and show pages based on location.hash
hashListeningEnabled: true,
// disable to prevent jquery from bothering with links
linkBindingEnabled: true,
// Set default page transition - 'none' for no transitions
defaultPageTransition: "slide",
@@ -130,7 +133,7 @@
getInheritedTheme: function( el, defaultTheme ) {
// Find the closest parent with a theme class on it.
var themedParent = el.closest( "[class*='ui-bar-'],[class*='ui-body-']" ),
// If there's a themed parent, extract the theme letter
// from the theme class .
ltr = ( themedParent.length && /ui-(bar|body)-([a-z])\b/.exec( themedParent.attr( "class" ) )[ 2 ] || "" ) || "";
@@ -1239,7 +1239,7 @@
$( document ).bind( "vclick", function( event ) {
// if this isn't a left click we don't care. Its important to note
// that when the virtual event is generated it will create
if ( event.which > 1 ){
if ( event.which > 1 || !$.mobile.linkBindingEnabled ){
return;
}
@@ -1256,6 +1256,10 @@
// click routing - direct to HTTP or Ajax, accordingly
$( document ).bind( "click", function( event ) {
if( !$.mobile.linkBindingEnabled ){
return;
}
var link = findClosestLink( event.target );
// If there is no link associated with the click or its not a left

0 comments on commit 8f5889a

Please sign in to comment.