Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.69 KB | None | 0 0
  1. (function($)
  2. {
  3.     $(document).ready(function()
  4.     {
  5.         $.ajaxSetup(
  6.         {
  7.             cache: false,
  8.             beforeSend: function() {
  9.                 $('#refresh-content').show();
  10.                 $('#update-time').show();
  11.                },
  12.             complete: function() {
  13.                 $('#refresh-content').show();
  14.                 $('#update-time').show();
  15.             },
  16.             success: function() {
  17.                 $('#refresh-content').show();
  18.                 $('#update-time').show();
  19.             }
  20.         });
  21.         var $container = $("#refresh-content");
  22.         $container.load("news.php");
  23.         var refreshId = setInterval(function()
  24.         {
  25.          $container.load('news.php');
  26.         }, 1000);
  27.     });
  28. })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement