2016-07-11 19 views
-1

私はちょうどSmooth Scrolling by CSS Tricksのスクリプトを私のshopifyストアサイトに実装しました。それは私のために動作しません:(スムーススクロール - CSSトリック - 機能しない

ここでスムーズなスクロールのスクリプト

<script> 
jQuery(function($) { 
    $j('a[href*="#"]:not([href="#"])').click(function() { 
     if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 
     var target = $j(this.hash); 
     target = target.length ? target : $j('[name=' + this.hash.slice(1) +']'); 
     if (target.length) { 
      $j('html, body').animate({ 
      scrollTop: target.offset().top 
      }, 1000); 
      return false; 
     } 
     } 
    }); 
    }); 
</script> 

と、この私の滑らかなスライダーのための別のコード

<script> 
jQuery(function($) { 
     $j('.obs_store_wall_slider').slick({ 
     dots: true, 
     infinite: true, 
     speed: 500, 
     fade: true, 
     draggable: false, 
     arrows: true, 
     autoplay: true, 
     autoplaySpeed: 5000, 
     pauseOnHover: true, 
     cssEase: 'linear' 
     }); 

    $j('.obs_store_wall_banner_slider').slick({ 
     dots: false, 
     infinite: true, 
     speed: 500, 
     draggable: true, 
     arrows: true, 
     autoplay: true, 
     autoplaySpeed: 5000, 
     pauseOnHover: true, 
     cssEase: 'linear' 
     }); 
    }); 
</script> 

my storeを訪れ、ライブアクションを見ることがあります

答えて

0

うわー、私は信じることができませんスクリプトは私のHTML構文のために動作していません、私はセクションにIDを入れましたID:D

関連する問題