私は今すぐ投票「フクロウカルーセルで」しかし「というボタンをクリックして上のdivは、常に次のdivにスワップ」を達成しようとしています、その上に次のdivに正確に一度だけスワップそれ以外のボタンをクリックすると正確に次のdivにスワップしません。私のfiddleリンクです。フクロウカルーセルと入れ替える複数のdivの
<script type="text/javascript">
$(document).ready(function() {
$(".go-swap").click(function() {
$("#currnt").swap({
target: "next",
opacity: "0.5",
speed: 1000,
});
});
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$('.item').hover(function(){
$(this).attr('id', 'currnt');
$(this).parent().prev().children().attr('id', 'next')},
function(){
$(this).attr('id', '');
$(this).parent().prev().children().attr('id', '')
});
});
</script>
<section id="demos">
<div class="row">
<div class="large-12 columns">
<div class="owl-carousel owl-theme">
<div class="item" data-hash="zero">
<h4>0</h4>
<a href="javascript://" class="go-swap"><button>Vote Now</button></a>
</div>
<div class="item" data-hash="one">
<h4>1</h4>
<a href="javascript://" class="go-swap"><button>Vote Now</button></a>
</div>
<div class="item" data-hash="two">
<h4>2</h4>
<a href="javascript://" class="go-swap"><button>Vote Now</button></a>
</div>
<div class="item" data-hash="three">
<h4>3</h4>
<a href="javascript://" class="go-swap"><button>Vote Now</button></a>
</div>
<div class="item" data-hash="four">
<h4>4</h4>
<a href="javascript://" class="go-swap"><button>Vote Now</button></a>
</div>
</div>
</div>
</div>
</section>
おかげで私は、私はそれが**次のdivにスワップ**は私のバイオリン –
こんにちは@ジム-miraidevを見ていてください投票Now]ボタンをクリックしたときにしたい、I解決策を得て、自分の[fiddle](https://jsfiddle.net/yajuvendra1990/b8qx6jjt/9/)を更新しましたが、2番目のDOT **をクリックして「投票今すぐ」の4番目の位置をクリックすると1つの問題があります"ボタンは、スライドの3番目の位置にスワップします。しかし、スライドの4番目の位置は隠されています。スライドの1番目のスライドを後方にスクロールし、スライドの4番目の位置にも表示したいです。手伝って頂けますか? –