I have the following code within the ajax success function.

```
$.each(data,function(index,element){                            
$.ajax({                
            type: 'GET',                    
            url: "http://192.168.1.56/SampleAjaxCall/sample.svc/sampleFunciton",                    
            contentType: 'application/json; charset=utf-8',
            dataType: 'jsonp',
            async: false,
            success:function(response){ 

                    alert("Success !");   // invokes after the loop     
            }           
        }); 

        alert("After the ajax call");     // invokes first
});

```

First i am getting this alert message **After the ajax call**. after the loop end i am getting this alert message **alert("Success !")**. So the ajax is invoked after the loop end. So i need to invoke the ajax first. How to achieve this scenario.