Skip to content

Instantly share code, notes, and snippets.

@greyxp
Created October 3, 2017 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greyxp/27eea575add611c1f21aa8852e23e3a7 to your computer and use it in GitHub Desktop.
Save greyxp/27eea575add611c1f21aa8852e23e3a7 to your computer and use it in GitHub Desktop.
Slider Revolution Adaptive Hack
/*
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