Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             function includehtml(id, url) {
  2.                 var req = false;
  3.                 try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {
  4.                     try { req = new XMLHttpRequest(); } catch (e) { req = false; }
  5.                     }
  6.                 }
  7.  
  8.                 if (req) {
  9.                     req.open('GET', url, false);
  10.                     req.send(null);
  11.                     $(id).empty();
  12.                     $(id).html(req.responseText);
  13.                     if (url == 'konten/home.html') {
  14.                         $('#sidebar ul').animate({'margin-top': '20px'});
  15.                     } else {
  16.                         $('#sidebar ul').animate({'margin-top': '90px'});
  17.                     }
  18.                     $('#sidebar ul li').removeClass('current');
  19.                 }
  20.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement