Making requests to the server with jQuery - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:jQuery Method Example

Description

Making requests to the server with jQuery

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.2.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){/*from  ww w.j a  va 2s  .c  om*/
var capturedAjax= $.ajax;
$.ajax=function myCustomAjax(options)
{
     options.beforeSend=function()
     {
        console.log('before send captured');
     }
     return capturedAjax(options);
}
    jQuery.get('http://google.com');
    });

      </script> 
 </head> 
 <body>  
 </body>
</html>

Related Tutorials