Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2011
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function() {
  2.    
  3.     $.ajaxSetup({
  4.         cache: false
  5.     });
  6.  
  7.     var ajax_load = "<img src='img/load.gif' alt='loading...' />";
  8.     var load_services = "other-financial-services.html";
  9.    
  10.     var pages = {   admin : "admin.php",
  11.                     intro : "intro.php",
  12.                     accounts : "accounts.php",
  13.                     auditing : "audit.php",
  14.                     tax : "taxation.php",
  15.                     staff : "staff.php",
  16.                     maurice : "maurice.php",
  17.                     david : "david.php",
  18.                     basil : "basil.php",
  19.                     craig : "craig.php",
  20.                     stuart : "stuart.php",
  21.                     jamesm : "jamesm.php",
  22.                     jamess : "jamess.php",
  23.                     lynsay : "lynsay.php",
  24.                     insolv : "insolv.php",
  25.                     forensic : "forensic.php",
  26.                     litigation : "litigation.php",
  27.                     book : "book.php",
  28.                     payroll : "payroll.php",
  29.                     secretary : "secretary.php",
  30.                     acquis : "acquis.php",
  31.                     residency : "residency.php",
  32.                     services : "services.php",
  33.                     vat : "vat.php",
  34.                     history : "history.php",
  35.                     economy : "economy.php",
  36.                     legal : "legal.php",
  37.                     security : "security.php",
  38.                     banking : "banking.php",
  39.                     taxationiom : "taxationiom.php",
  40.                     amenities : "amenities.php",
  41.                     external : "external.php" };
  42.        
  43.     $("li a[id^=load_]").each(function(){
  44.         $(this).click(function() {
  45.             $("#result1").html(ajax_load).load(pages[$(this).attr("id")])
  46.         });
  47.     });
  48.  
  49.    
  50.     var url = document.location.toString();
  51.     if (url.match('#')) { // the URL contains an anchor
  52.         // click the navigation item corresponding to the anchor
  53.         var anchor = '#' + url.split('#')[0];
  54.         $('#load_' + anchor).click();
  55.     }
  56. });
  57.  
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement