mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-05 13:14:45 +00:00
add linkBindingEnabled to mobile object for complex apps that want to handle all nav
This commit is contained in:
parent
0a84a9eeea
commit
8f5889a707
2 changed files with 9 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue