From 72f9700b55012d37098612a9a3ccba9d97c2f0c8 Mon Sep 17 00:00:00 2001 From: Evander Bergman Date: Sat, 9 Aug 2014 13:22:38 +0300 Subject: [PATCH 1/2] Added Feature: Allowed the navigation to open from the left in addition to the default right, through a customization option. --- jquery.fs.shifter.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jquery.fs.shifter.js b/jquery.fs.shifter.js index 08165f3..fa3a982 100644 --- a/jquery.fs.shifter.js +++ b/jquery.fs.shifter.js @@ -26,7 +26,8 @@ * @param maxWidth [string] <'980px'> "Width at which to auto-disable plugin" */ var options = { - maxWidth: "980px" + maxWidth: "980px", + appearFromLeft: false }; var pub = { @@ -54,7 +55,7 @@ */ enable: function() { if (initialized) { - data.$body.addClass("shifter-active"); + options.appearFromLeft ? data.$body.addClass("shifter-active shifter-left") : data.$body.addClass("shifter-active"); } }, @@ -77,7 +78,7 @@ */ destroy: function() { if (initialized) { - data.$body.removeClass("shifter shifter-active shifter-open") + data.$body.removeClass("shifter shifter-active shifter-open shifter-left") .off("touchstart.shifter click.shifter"); // Navtive MQ Support From ee4f6cd54830372ff907fb9c59c81e129685ba0a Mon Sep 17 00:00:00 2001 From: Evander Bergman Date: Sat, 9 Aug 2014 13:33:18 +0300 Subject: [PATCH 2/2] Updated Demo: Added an additional option [appearFromLeft], to show how the navigation behaves when opened from the left side. --- demo/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/demo/index.html b/demo/index.html index 57ca0b2..b2b578d 100644 --- a/demo/index.html +++ b/demo/index.html @@ -36,7 +36,8 @@