From d467adc46c6b0749563dabe7d591544707b58209 Mon Sep 17 00:00:00 2001 From: poopsplat Date: Wed, 6 Nov 2013 06:37:35 -0300 Subject: [PATCH 1/3] Adding a scrollOffset option to the settings for fixed headers --- jquery.joyride-2.1.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jquery.joyride-2.1.js b/jquery.joyride-2.1.js index 3e083eb..20fba7c 100755 --- a/jquery.joyride-2.1.js +++ b/jquery.joyride-2.1.js @@ -17,6 +17,7 @@ 'nubPosition' : 'auto', // override on a per tooltip bases 'scroll' : true, // whether to scroll to tips 'scrollSpeed' : 300, // Page scrolling speed in milliseconds + 'scrollOffset' : 0, // Scrolling offset for fixed headers 'timer' : 0, // 0 = no timer , all other numbers = timer in milliseconds 'autoStart' : false, // true or false - false tour starts when restart called 'startTimerOnClick' : true, // true or false - true requires clicking the first button start the timer @@ -419,7 +420,7 @@ tipOffset = Math.ceil(settings.$target.offset().top - window_half + settings.$next_tip.outerHeight()); $("html, body").stop().animate({ - scrollTop: tipOffset + scrollTop: tipOffset - settings.scrollOffset }, settings.scrollSpeed); }, From 809a5daac369c7a5fd03483511e2f6f0c9de6009 Mon Sep 17 00:00:00 2001 From: poopsplat Date: Thu, 7 Nov 2013 11:00:07 -0300 Subject: [PATCH 2/3] Reverting changes to master, will apply changes to feature branch --- jquery.joyride-2.1.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jquery.joyride-2.1.js b/jquery.joyride-2.1.js index 20fba7c..3e083eb 100755 --- a/jquery.joyride-2.1.js +++ b/jquery.joyride-2.1.js @@ -17,7 +17,6 @@ 'nubPosition' : 'auto', // override on a per tooltip bases 'scroll' : true, // whether to scroll to tips 'scrollSpeed' : 300, // Page scrolling speed in milliseconds - 'scrollOffset' : 0, // Scrolling offset for fixed headers 'timer' : 0, // 0 = no timer , all other numbers = timer in milliseconds 'autoStart' : false, // true or false - false tour starts when restart called 'startTimerOnClick' : true, // true or false - true requires clicking the first button start the timer @@ -420,7 +419,7 @@ tipOffset = Math.ceil(settings.$target.offset().top - window_half + settings.$next_tip.outerHeight()); $("html, body").stop().animate({ - scrollTop: tipOffset - settings.scrollOffset + scrollTop: tipOffset }, settings.scrollSpeed); }, From f25223a68bd9b6403069489c0ee9cc23b484d83f Mon Sep 17 00:00:00 2001 From: poopsplat Date: Thu, 7 Nov 2013 11:09:11 -0300 Subject: [PATCH 3/3] Adding breakpoint option to settings to allow changing where the mobile layout is triggered --- jquery.joyride-2.1.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jquery.joyride-2.1.js b/jquery.joyride-2.1.js index 3e083eb..b0ac5c1 100755 --- a/jquery.joyride-2.1.js +++ b/jquery.joyride-2.1.js @@ -17,6 +17,7 @@ 'nubPosition' : 'auto', // override on a per tooltip bases 'scroll' : true, // whether to scroll to tips 'scrollSpeed' : 300, // Page scrolling speed in milliseconds + 'breakpoint' : 768, // Sets the point in px at which the tips will switch to a full-width layout 'timer' : 0, // 0 = no timer , all other numbers = timer in milliseconds 'autoStart' : false, // true or false - false tour starts when restart called 'startTimerOnClick' : true, // true or false - true requires clicking the first button start the timer @@ -354,10 +355,10 @@ // detect phones with media queries if supported. is_phone : function () { if (Modernizr) { - return Modernizr.mq('only screen and (max-width: 767px)'); + return Modernizr.mq('only screen and (max-width: ' + settings.breakpoint + 'px)'); } - return (settings.$window.width() < 767) ? true : false; + return (settings.$window.width() < settings.breakpoint) ? true : false; }, support_localstorage : function () {