diff --git a/src/splitviewnavigator/splitviewnavigator.js b/src/splitviewnavigator/splitviewnavigator.js index 20992df..9a94e01 100644 --- a/src/splitviewnavigator/splitviewnavigator.js +++ b/src/splitviewnavigator/splitviewnavigator.js @@ -17,7 +17,8 @@ var SplitViewNavigator = function( target, options ) { CSSNamespace: 'splitViewNavigator_', toggleButtonLabel: 'Menu', backLinkCSS: 'viewNavigator_backButton', - bindToWindow: true + bindToWindow: true, + useNoClickDelay: true }; this.options = options = $.extend( {}, defaults, options ); @@ -72,8 +73,10 @@ var SplitViewNavigator = function( target, options ) { this.contentOverlay.click( function(event){ self.hideSidebar() } ); - new NoClickDelay( this.contentOverlay.get()[0] ); - new NoClickDelay( this.toggleSidebarButton.get()[0] ); + if ( this.options.useNoClickDelay ) { + new NoClickDelay( this.contentOverlay.get()[0] ); + new NoClickDelay( this.toggleSidebarButton.get()[0] ); + } window.splitViewNavigator = this; } diff --git a/src/viewnavigator/viewnavigator.js b/src/viewnavigator/viewnavigator.js index 56d3363..0603254 100644 --- a/src/viewnavigator/viewnavigator.js +++ b/src/viewnavigator/viewnavigator.js @@ -16,7 +16,8 @@ var ViewNavigator = function( target, options ) { var defaults = { CSSNamespace: 'viewNavigator_', backLinkCSS: 'viewNavigator_backButton', - bindToWindow: true + bindToWindow: true, + useNoClickDelay: true }; this.options = options = $.extend( {}, defaults, options ); @@ -268,7 +269,7 @@ ViewNavigator.prototype.updateView = function( viewDescriptor ) { this.resetScroller(); } - if ( viewDescriptor.backLabel ) { + if ( viewDescriptor.backLabel && this.options.useNoClickDelay ) { new NoClickDelay( this.headerBacklink.get()[0] ); } @@ -327,7 +328,7 @@ ViewNavigator.prototype.resetScroller = function() { self.scroller.scrollTo( 0, parseInt( scrollY, 10 ) ); } }, 10 ); - //this.scroller = new iScroll( id ); + } else { var target = $('#'+id );