使用jquery.gritter.js實現彈框提示信息


jQuery(document).ready(function() {    
     setInterval(function(){
         $.post('servlet/newNcheCheck',function(data){
              if(data=="true"){
                    setTimeout(function () {
                            //document.getElementById("sound").src="<%=basePath%>admin/media/global.wav";
                            var unique_id = $.gritter.add({
                                        title: '<font color="#5a0101">新消息</font>',
                                        text:'你有新商機消息未處理<br><a href="modules/shniche/diallogMaint.jsp" style="color:#ccc">商機信息管理</a>',
                                        image: 'images/msg.png',
                                        sticky: true,
                                        time: '',
                                        class_name: 'gritter-light'
                                    });
                            setTimeout(function () {
                                        $.gritter.remove(unique_id, {
                                            fade: true,
                                            speed: 'slow'
                                             });
                                          }, 12000);
                            }, 2000);
              }
        });
    },2000);
});


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM