Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. $("header")
  2. .on({
  3. ajaxStart: function () {
  4. $(this).addClass("ajax-loading");
  5. },
  6. ajaxStop: function () {
  7. $(this).removeClass("ajax-loading");
  8. }
  9. });
  10.  
  11. $("header")
  12. .on({
  13. ajaxStart: function () {
  14. $(this).css( 'cursor', 'progress' );
  15. },
  16. ajaxStop: function () {
  17. $(this).css( 'cursor', 'default' );
  18. }
  19. });
  20.  
  21. $("header")
  22. .on({
  23. ajaxStart: function () {
  24. $('body').css( 'cursor', 'progress' );
  25. },
  26. ajaxStop: function () {
  27. $('body').css( 'cursor', 'default' );
  28. }
  29. });
  30.  
  31. $.ajax({
  32. beforeSend: function() { //function to do whatever you want to do; }
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement