title: Getting undefined when calling the function
body: <p>I have this function which parses the JSON. I am getting undefined when I am calling it in a .live function.</p>
  
  <p>Here is the function that I have created,</p>
  
  <pre><code>function getAbc() {
                      var details;
                      var id = $(this).attr('data-id');
                      $.ajax({
                          url : '/index.php/data',
                          type : 'GET',
                          data : 'persons[]=' + id,
                          success : function(data, textStatus, xhr) {
                              details = JSON.parse(data);
                          },
                      });
                      return details;
                  }
  </code></pre>
  
  <p>I am simply calling like this, getAbc(). And is there any way that I can access details variable in the function?</p>