나는 하나를 보여주고 다른 하나를 계속 숨기고 싶은 두 개의 div가 있습니다. 내가 가지고있는 코드는 첫 번째 코드 인 Mass_alert
만을 보여줍니다. 두 div를 모두 표시하고 숨기려면 무엇을 수정해야합니까?두 div를 표시하고 숨기는 파들 사진
여기에 HTML이 있습니다.
<div style="position: relative; top: 50px; width: 778px; margin: 0 auto;">
<div id="alerts" style="float: right; width:200px; height: 25px; background: goldenrod; border-radius: 3px 3px 3px 3px; font: 11px Arial; color: #404040; overflow: hidden;">
<div id="Mass_alert" class="alert" style="position: relative; top: 5px; margin: 0 auto; text-align: center; width:100%; height: 20px;"></div>
<div id="Devotion_alert" class="alert" style="position: relative; top: 5px; margin: 0 auto; text-align: center; width:100%; height: 20px; visibility: hidden;"></div>
</div>
</div>
페이드 토글을 수행하는 코드는이 코드입니다.
$(document).ready(function() {
show_next_Mass(channel_array_sort);
show_next_devotion();
setInterval("show_alerts()",10000);
var continuous = function() {
$("#Mass_alert").fadeToggle(600);
$("#Devotion_alert").fadeToggle(600);
};
setInterval(continuous,600);
});
작동하는 것 같습니다. 이 바이올린에는 내가 원하는 애니메이션이 있습니다. http://jsfiddle.net/GsamY/3/. – user823527
div에 fadeToggle 사이에 잠시 멈출 수있는 방법이 있습니까? – user823527