Skip to content

Instantly share code, notes, and snippets.

@ajmalafif
Last active December 11, 2015 09:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ajmalafif/4578292 to your computer and use it in GitHub Desktop.
Save ajmalafif/4578292 to your computer and use it in GitHub Desktop.
[WP] - Flexslider customizations
$(window).resize(function() {
  var ww = $(window).width();
  $('.flexslider ul li').each(function() {
    $(this).width(ww);
  });
});
$(window).load(function() {
$('.flexslider').flexslider({
directionNav : false,
animation: "slide",
start: function(slider) {
$('.slides li img').click(function(event){
event.preventDefault();
slider.flexAnimate(slider.getTarget("next"));
});
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment