Skip to content

Instantly share code, notes, and snippets.

@msanroman
Created March 16, 2016 09:27
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 msanroman/b0e8abf171640f7507b0 to your computer and use it in GitHub Desktop.
Save msanroman/b0e8abf171640f7507b0 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
var womenSliderStarted = false;
var width = $(window).width();
$("#mujeres").click(function () {
$("#men_slider").hide();
$("#women_slider").show();
if( !womenSliderStarted ) {
if (width >= 1023) {
new Slider(
"#women_slider",
{
visibleImages: 3,
imageMargin: 160
}
);
} else {
new Slider(
"#women_slider",
{
visibleImages: 1,
imageMargin: 10
}
);
}
womenSliderStarted = true;
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment