Showing
1 changed file
with
60 additions
and
0 deletions
js/slick_media.js
0 → 100644
| 1 | +$(function(){ | |
| 2 | + var sm = window.matchMedia('(min-width: 768px)'); | |
| 3 | + if(sm.matches){ | |
| 4 | + $('#wrapper-1-1').slick({ | |
| 5 | + accessibility:true, | |
| 6 | + autoplay: true, | |
| 7 | + arrow: true, | |
| 8 | + infinite: true, | |
| 9 | + arrow: true, | |
| 10 | + speed: 800, | |
| 11 | + }); | |
| 12 | + $('#wrapper-2-1').slick({ | |
| 13 | + slidesToShow: 4, | |
| 14 | + slidesToScroll: 1, | |
| 15 | + autoplay: false, | |
| 16 | + dots: true | |
| 17 | + }); | |
| 18 | + $('#wrapper-3-1').slick({ | |
| 19 | + slidesToShow: 4, | |
| 20 | + slidesToScroll: 1, | |
| 21 | + dots: true, | |
| 22 | + autoplay: true, | |
| 23 | + arrow: false, | |
| 24 | + swipe: false | |
| 25 | + }); | |
| 26 | + $('.index-content-mar').removeClass(); | |
| 27 | + var navH = $('.header-wrapper').offset().top; | |
| 28 | + $(window).scroll(function(){ | |
| 29 | + var scroH = $(this).scrollTop(); | |
| 30 | + if(scroH >= navH) | |
| 31 | + $('.header-wrapper').css({'position':'fixed','top':'0','z-index':'10','background-color':'white','width':'1450px'}); | |
| 32 | + else if(scroH < navH) | |
| 33 | + $('.header-wrapper').css({'position':'relative','width':'1450px','background-color':'white'}); | |
| 34 | + }); | |
| 35 | + } | |
| 36 | + else{ | |
| 37 | + $('#wrapper-1-1').slick({ | |
| 38 | + accessibility:true, | |
| 39 | + autoplay: true, | |
| 40 | + arrow: true, | |
| 41 | + infinite: true, | |
| 42 | + arrow: true, | |
| 43 | + speed: 500, | |
| 44 | + }); | |
| 45 | + $('#wrapper-2-1').slick({ | |
| 46 | + slidesToShow: 1, | |
| 47 | + slidesToScroll: 1, | |
| 48 | + autoplay: false, | |
| 49 | + dots: true | |
| 50 | + }); | |
| 51 | + $('#wrapper-3-1').slick({ | |
| 52 | + slidesToShow: 1, | |
| 53 | + slidesToScroll: 1, | |
| 54 | + dots: true, | |
| 55 | + autoplay: true, | |
| 56 | + arrow: false, | |
| 57 | + swipe: false | |
| 58 | + }); | |
| 59 | + } | |
| 60 | + }); | |
| \ No newline at end of file | ... | ... |
Please
register
or
login
to post a comment