Backtracking function inside a function
<p>I am <strong>backtracking</strong> a code to find out what it actually does. I got into the function <code>getResults()</code> but I am unable to understand how would the function <code>success()</code> get triggered here. Please guide me. Thanks in advance.</p>

<pre><code>function getResults(u) {
//alert("Inside get results");
    $.ajax({
        dataType: "jsonp", 
        url: u,
        success: function(res) {                                                    
        alert("Inside success");                                                        
              $("#status").hide();                                                      
              if (res.data.length) {
                  // do something                                                       
            } else {
              // do something else
            }; 
        } 
    });
}
</code></pre>
