Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 19th, 2010 | Syntax: JavaScript | Size: 0.46 KB | Hits: 167 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. $(document).ready(function(){
  2.     var ajax_load = '<img id="ajax_load" src="http://imall/js/load.gif" alt="loading..." />';
  3.  
  4.     //  load() functions
  5.     var loadUrl = "http://imall/js/load.php";
  6.  
  7.    
  8.     $(".category-list").click(function() {
  9.         $(".catcontent").html(ajax_load);
  10.                
  11.                 var href = $(this).attr("href");
  12.  
  13.                 $('.catcontent').load(loadUrl+href, function(){
  14.                         $("#ajax_load").remove();
  15.                 });
  16.                
  17.                 return false;
  18.     });
  19.    
  20.  
  21. });