diff options
author | Jayaram Pai | 2014-04-24 19:13:41 +0530 |
---|---|---|
committer | Jayaram Pai | 2014-04-24 19:13:41 +0530 |
commit | 995583afae9fb27b0534a6e8bb35f4c217ff58ab (patch) | |
tree | effa4937a042fc94b0f6232dd8b803a58fa89ca2 /static/website/templates | |
parent | 1626ba1fa8734d8c278246ff9030f4c343ae84f3 (diff) | |
download | spoken-tutorial-forums-995583afae9fb27b0534a6e8bb35f4c217ff58ab.tar.gz spoken-tutorial-forums-995583afae9fb27b0534a6e8bb35f4c217ff58ab.tar.bz2 spoken-tutorial-forums-995583afae9fb27b0534a6e8bb35f4c217ff58ab.zip |
updated slick version
changed next-prev scroll speed
Diffstat (limited to 'static/website/templates')
-rw-r--r-- | static/website/templates/index.html | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/static/website/templates/index.html b/static/website/templates/index.html index 038aab6..5dd19e6 100644 --- a/static/website/templates/index.html +++ b/static/website/templates/index.html @@ -135,7 +135,8 @@ {% block javascript %} <script> $(document).ready(function(){ - $('.carousel').slick({ + + $carousel = $('.carousel').slick({ lazyLoad: 'ondemand', dots: false, touchMove: false, @@ -145,8 +146,25 @@ speed: 2000, autoplay: true, autoplaySpeed: 2000, + infinite: true, }); + $(".slick-prev").unbind(); + $(".slick-next").unbind(); + $(".slick-prev").bind("click", function(e) { + var current_slide = $carousel.slickCurrentSlide(); + $carousel.slickSetOption("slidesToScroll",3); + $carousel.slickGoTo(current_slide + 3); + $carousel.slickSetOption("slidesToScroll",1); + e.stopPropagation(); + }); + $(".slick-next").bind("click", function(e) { + var current_slide = $carousel.slickCurrentSlide(); + $carousel.slickSetOption("slidesToScroll",3); + $carousel.slickGoTo(current_slide - 3); + $carousel.slickSetOption("slidesToScroll",1); + e.stopPropagation(); + }); $("#filter-form").submit(function(e) { var category = $("#filter-select").val(); if(category != -1) { |