Guest User

Untitled

a guest
Jan 20th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. var loadUrl=b_url+page;
  2. if (History.enabled) {History.pushState({state:2}, page, "/"+page);}
  3. window.name=page;
  4. $.ajax({
  5. cache: false,
  6. async: false,
  7. type: "POST",
  8. url: loadUrl,
  9. dataType: "html",
  10. beforeSend: function() {
  11. $('.contentarea').animate({
  12. 'opacity' : 0
  13. }, 180, 'jswing', function(){
  14. $('#mainc').hide(350, 'jswing');
  15. });
  16. },
  17. success: function(response) {
  18. $('#mainc').html(response);
  19. alert('success')
  20. },
  21. failure: function(msg) {
  22. alert('FAIL');
  23. }
  24. });
  25.  
  26. $('#mainc').html(response);
  27.  
  28. $(document).ajaxError(function(e, xhr, settings, exception) {
  29. alert('error in: ' + settings.url + ' n'+'error:n' + xhr.responseText );
  30. });
  31.  
  32. $('#mainc').ajaxComplete(function(){ alert('bob')})
  33.  
  34. $("#mainc").load(loadUrl);
  35.  
  36. $("#mainc").load(loadUrl, function(){ alert('bob' });
  37.  
  38. $("#mainc").load(loadUrl);
Add Comment
Please, Sign In to add comment