Created
October 3, 2017 11:29
-
-
Save greyxp/27eea575add611c1f21aa8852e23e3a7 to your computer and use it in GitHub Desktop.
Slider Revolution Adaptive Hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
replace the "65" in the "revapi65" part below with your slider's ID | |
http://tinyurl.com/zb6hzpc | |
*/ | |
var api = revapi5; | |
var screenSize = jQuery(window).width(), | |
layout; | |
/* desktop screen size */ | |
if(screenSize >= 801) { | |
/* layout options are "fullscreen", "fullwidth" and "auto" */ | |
layout = 'auto'; | |
} | |
/* mobile screen size */ | |
else { | |
/* layout options are "fullscreen", "fullwidth" and "auto" */ | |
layout = 'fullwidth'; | |
} | |
var sliderSettings = api.data('opt') || api[0].opt; | |
/* console.log(sliderSettings); */ | |
sliderSettings.sliderLayout = layout; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment