0
私はナビゲーションがどこに行くのかを制御しようとしています。私のHTMLは次のようになります。Owl Carouselのナビゲーションをデフォルトディビジョンの外に移動するにはどうすればよいですか?
<!-- Testimonials -->
<?php if(have_rows('testimonials')): ?>
<div class="testimonial-header">
<h5>Testimonials</h5>
<div class="testimonial-controls owl-theme">
<div class="owl-controls">
<div id="customNav" class="owl-nav"></div>
</div>
</div><!-- end testimonial-controls -->
</div><!-- end testimonial-header -->
<div class="owl-carousel owl-theme testimonials">
<?php while(have_rows('testimonials')): the_row();
// vars
$testimonial = get_sub_field('testimonial');
$author = get_sub_field('author');
?>
<div class="testimonial-item">
<?php if($testimonial): ?>
<div class="testimonial-message">
<?php echo $testimonial; ?>
</div>
<div class="testimonial-author">
<p><?php echo $author; ?></p>
</div>
<?php endif; ?>
</div>
<?php endwhile; ?>
</div> <!-- end testimonials -->
<?php endif; ?>
そして、私のjavascriptのは、次のようになります
$('.testimonials').owlCarousel({
items: 1,
loop:false,
margin:0,
nav:true,
navContainer: '#customNav',
navText: [],
dots: false,
});
しかし、フロントエンドには、私は私のナビゲーションが表示されません。私もOwl Carouselの最新バージョンを使用しています。
私は、私が実際に持っているもののすべてを表示するには、私のOPを更新しました。私はSOに関連するコードだけを表示するように言われたので、簡略化しようとしました。引用エラーは実際に私のコードではありません。私はあなたの 'navText'をコピーしようとしましたが、それは私がスクリプト内で違ったものを見ることができる唯一のものだったからです。 –
私のファイルにあなたのコードを貼り付けましたが、スニペットのようにボタンを表示することができません。とても奇妙な... –