我是网站开发新手。我的代码运行完美。我想要的只是,当我点击第一个 div
时,它会以翻转动画消失,第二个div
出现。然后当我点击第二个 div
时,同样的动画发生,第三个 div
出现。我只需要CSS或jQuery代码来翻转消失的div。
<div class="row">
<div class="col-md-6 abc">
<div style="background:grey">
text here
</div>
<div style="background:blue;display:none">
text here
</div>
<div style="background:green;display:none">
text here
</div>
</div>
</div>
$('.col-md-6').click(function() {
var $current = $(this).find('div:visible');
var $next = $current.next()
if ($next.length) {
$current.hide();
$next.show();
}
});