From 2fa97afb63df2bfd6ab7900c42f7bfbf0e503daf Mon Sep 17 00:00:00 2001 From: Peter Maloy Date: Mon, 28 Sep 2015 14:00:15 -0400 Subject: [PATCH] Added a step to clone left side content to right side as an alternative way to generate fullscreen slides. CSS hides/aligns potentially overlapping content. --- jquery.multiscroll.css | 8 ++++++++ jquery.multiscroll.js | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/jquery.multiscroll.css b/jquery.multiscroll.css index f3147df..92b2e59 100644 --- a/jquery.multiscroll.css +++ b/jquery.multiscroll.css @@ -16,6 +16,7 @@ html, body { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; + overflow:hidden; } .ms-section.ms-table{ display: table; @@ -33,6 +34,13 @@ html, body { -o-transition: all 0.7s ease-out; transition: all 0.7s ease-out; } +.ms-fullscreen-content{ + width:200%; + box-sizing:border-box; +} +.ms-fullscreen-right .ms-fullscreen-content{ + margin-left:-100%; +} #multiscroll-nav { position: fixed; z-index: 100; diff --git a/jquery.multiscroll.js b/jquery.multiscroll.js index e3a560e..305a864 100644 --- a/jquery.multiscroll.js +++ b/jquery.multiscroll.js @@ -121,6 +121,11 @@ $('.ms-left .ms-section, .ms-right .ms-section').each(function(){ var sectionIndex = $(this).index(); + //clone left side to right if the right side is empty + if( $(this).hasClass('ms-fullscreen-right') ){ + $(this).empty().append( $('.ms-left .ms-section')[sectionIndex].innerHTML ); + } + if(options.paddingTop || options.paddingBottom){ $(this).css('padding', options.paddingTop + ' 0 ' + options.paddingBottom + ' 0'); } @@ -863,4 +868,4 @@ }; }; -})(jQuery, window, document, Math); \ No newline at end of file +})(jQuery, window, document, Math);