I need to move the entire div content from bottom to top on load, After 30 seconds onload i need to replace the #content-box to #content-box2
<script type="text/javascript">
$("document").ready(Show_Alert());
function Show_Alert() {
$(function(){
$("#content-box").animate({'bottom': 1900},700);
});
}
</script>
<div id = "content-box">
qwerty
</div>
<div id = "content-box2">
1234567890
</div>
最佳答案
使用这个脚本:
$(document).ready(function(){
setTimeout('Show_Alert()', 30000);
});
function Show_Alert() {
$("#content-box2").animate({'bottom': '1900px'},2000);
}
还有这个 CSS:
#content-box2 { position: absolute; bottom:0; left:0; width: 100%; }
如果这对您没有帮助,您能否向我们提供内容框的 CSS 并告诉我们 30 秒后究竟应该发生什么?
关于javascript - Jquery 动画整个 div 内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33315820/