Javascript 加载页面时的不引人注目的反馈(onload)

Javascript 加载页面时的不引人注目的反馈(onload),javascript,jquery,user-interface,user-feedback,Javascript,Jquery,User Interface,User Feedback,我在页面的页脚添加了此脚本,加载页面后,该脚本将闪烁页面通常为黑色的背景: <script> $(document).ready(function() { function highlight_background(){ if(document.getElementById('content')) { //fading background: $('#content').css({

我在页面的页脚添加了此脚本,加载页面后,该脚本将闪烁页面通常为黑色的背景:

<script>
$(document).ready(function() {
        function highlight_background(){
            if(document.getElementById('content')) {
                //fading background:
                $('#content').css({backgroundColor:"#081108"});
                $('#content').animate({backgroundColor: "black"}, 2000);
            }
         }
         highlight_background();
)}
</script>

$(文档).ready(函数(){
函数highlight_background(){
if(document.getElementById('content')){
//褪色背景:
$('content').css({backgroundColor:'081108});
$(#content')。制作动画({backgroundColor:“black”},2000年);
}
}
突出显示背景();
)}
这在黑色背景下看起来很棒,就像在我的电脑里一样

但是现在我计划在我的一个客户的一个严肃应用程序中为用户实现一个反馈,该应用程序具有白色背景。那里看起来太好玩了


您知道如何在页面加载后管理非强制性反馈吗?

用粉色屏幕代替:

<script>
$(document).ready(function() {
    function highlight_background(){
        if(document.getElementById('content')) {
            //fading background:
            $('#content').css({backgroundColor:"#081108"});
            $('#content').animate({backgroundColor: "pink"}, 2000);
        }
     }
     highlight_background();
)}
</script>

$(文档).ready(函数(){
函数highlight_background(){
if(document.getElementById('content')){
//褪色背景:
$('content').css({backgroundColor:'081108});
$(#content')。制作动画({backgroundColor:“pink”},2000年);
}
}
突出显示背景();
)}