2017-10-28 2 views
0

おはよう。だから、私はこのスクリプトを持っています:モバイルデバイスで指定したセクションにスライドを追加する(Fullpage JSを使用)

<section class="section"> 
    <div class="row text-center profilmain"> 
     <div class="portofoliogallery col-12 col-sm-6 col-md-4 col-lg-4"> 
       1  
     </div> 
     <div class="portofoliogallery col-12 col-sm-6 col-md-4 col-lg-4"> 
       2 
     </div> 
    </div> 
</section> 

これで通常は2つの色が正しくなりますか?今私はそれがモバイルデバイスで、それが唯一の

if($(window).width() < 600){ 
     $('.portofoliogallery').addClass('slidesection'); 
     var $this = $('.portofoliogallery').first(); 
     $this.parent('.row').addClass('flex-row flex-nowrap'); 
    } 
}); 

、私はフルページのjs https://alvarotrigo.com/fullPage/#secondPageからslideを追加したい1 coloumnを表示するかどうかの条件を作りたいです。私は今、私は私の「.portofoliogallery」に.slidesectionの追加が完了しています。この

if($(window).width() < 600){ 
     $('.portofoliogallery').addClass('slidesection'); 
     var $this = $('.portofoliogallery').first(); 
      $this.parent('.row').addClass('flex-row flex-nowrap'); 
      alert($('.portofoliogallery').hasClass('slidesection')); 
    } 
}); 

に私のスクリプトを変更するが、問題は私のスライドが機能していないです。スライドできず、すでにslideselectorslideSelector:'.slidesection'に変更しています。だから何が恋しいの?申し訳ありません悪い英語

答えて

1

新しいスライドを認識できるように、fullPage.jsをもう一度破棄して初期化する必要があります。

this postで私の答えをチェックしてください。

関連する問題