我正在創建一個傳送帶以顯示自定義文章類型。循環工作正常,我設法按照我想要的方式獲得佈局。但是,當用戶點擊下一個/ prev鏈接時,轉換後轉盤閃爍,然後再次彈出。當我點擊下一個或上一個鏈接時,JQuery傳送帶閃爍
這裏是鏈接了現場演示:https://goace.vc/teste-exits/
轉盤代碼:
<div id="exits" class="carousel" data-ride="carousel">
<div class="carousel-inner" role="listbox">
<?php
$current = 0;
if($exits->have_posts()): while($exits->have_posts()) : $exits->the_post();
if ($current == 0) {
$exitStatus = 'active';
} else {
$exitStatus = '';
}
?>
<?php if ($current % 2 === 0) { ?>
<div class="item <?=$exitStatus?>">
<?php } ?>
<div class="col-sm-6">
<div class="exit-box">
<div class="col-xs-7">
<div class="exit-img" style="background-image: url('https://goace.vc/wp-content/uploads/2017/04/0028_Fundacity.png')"></div>
</div>
<div class="col-xs-5 exit-details">
<h3><?= get_the_title(); ?></h3>
<hr>
<p><?= the_excerpt(); ?></p>
<hr class="half-line">
<?php
$tipoExit = wp_get_post_terms(get_the_ID(), 'tipo_exit', array("fields" => "names"));
$anoExit = wp_get_post_terms(get_the_ID(), 'ano_do_exit', array("fields" => "names"));
?>
<p><small>Exit: <b><?= $tipoExit[0] ?></b><br>Ano: <b><?= $anoExit[0] ?></b></small></p>
</div>
</div>
</div>
<?php
$current++;
if ($current % 2 === 0) {
?>
</div>
<?php } ?>
<?php endwhile; endif; ?>
</div>
<a data-slide="prev" href="#exits" class="left carousel-control">‹</a>
<a data-slide="next" href="#exits" class="right carousel-control">›</a>
</div>
是什麼原因造成這樣的任何想法?
非常感謝!
顯示所有與'in_progress'類相關的代碼。 –