2017-01-27 5 views
0

に対象になって/コードを上書きし、私が何を意味するか参照してください。 https://www.youtube.com/watch?v=yJ2-fMjRROY&feature=youtu.be&t=274VCカルーセル - 私はカルーセル後のギャップに問題があるjqueryの

そして、私の質問はに取得する方法ですカスタムjsコードからオブジェクトをjqueryし、それを変更しますか?どうすればデバッグできますか?

私はそれを無限にする方法を知っています、私はちょうど、jsコードを上書きする方法を知りません。

私はそのような何かをしたいが、オブジェクト内

$('vc_carousel-slideline .vc_item.vc_active:nth-last-of-type(5)').each(function() { 
    $(this).removeClass('vc_active'); 
    $('vc_carousel-slideline .vc_item:first-of-type').addClass('vc_active'); 
}); 

答えて

0

は、あなたのテーマのファイル

(function ($) { 
    $(document).ready(function() { 
    $('.vc_carousel-slideline-inner .vc_item:nth-last-of-type(5)').addClass("last-logo"); 
    $('.vc_carousel-slideline .vc_item.vc_active.last-logo').each(function() { 
     $(this).removeClass('vc_active'); 
     $('.vc_carousel-slideline .vc_item:first-of-type').addClass('vc_active'); 
     $('.vc_carousel-slideline .vc_item:nth-last-of-type(4)').removeClass('vc_active'); 
    }); 
    }); 
    setInterval(carouselfix, 500); 

    function carouselfix() { 
    $('.vc_carousel-slideline .vc_item.last-logo').removeClass('vc_active'); 
    } 
})(jQuery, this); 

ない完璧なソリューションcustom.js /編集を作成し、それは

の作品