How do we make ajax call after page load.
I need to make a ajax call suppose after 10sec document has loaded.
function loadajax(){
  $.ajax({ 
    url:'test',
    data:"username=test",
    type:"post",
    success:function(){
     //do action
    }
  });
}
 $('document').load(function(){
setTimeout(function(){
   loadajax();
 },10000);
});
I am doing it in this way. But doesn't succeeded.
 
     
     
     
     
    