2009-03-05 23 views

Trả lời

13

Tôi nghĩ điều bạn đang tìm kiếm là jQuery BlockUI.

Hãy xem qua số demo's.

Sử dụng css bạn có thể khớp với kiểu gmail.

+0

Trình cắm tuyệt vời, tìm tốt. – Kieron

+0

nếu bạn chỉ muốn hiển thị thư, sử dụng http://stanlemon.net/pages/jgrowl thì đơn giản hơn. –

5

Bạn có thể sử dụng plugin, nhưng bạn cũng có thể đặt DIV cố định ở đầu trang và làm mờ nó vào/ra. Hãy xem ví dụ:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
     <title>jQuery</title> 
     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> 
     <script type="text/javascript"> 
      $(document).ready(function() { 
       $('input').click(function() { 
        $('#notification').fadeIn('slow'); 
       }); 
      }); 
     </script> 
    </head> 
    <body style="height: 1000px;"> 
     <div id="notification" style="position: fixed; top: 0px; margin-left: 50%; background-color: yellow; font-weight: bold; display: none;">Sending...</div> 
     <input type="button" value="Gmail notification!" /> 
    </body> 
</html> 

Bạn phải tìm cách ẩn (gọi lại sau khi thao tác hoàn tất, v.v.), tạo kiểu và vân vân. Đó chỉ là một ví dụ.

Các vấn đề liên quan