title: Detect if input focus event triggered by script or mouse click
body: <p>I'm handling a focus event on an input and it fires an AJAX request to run $.autocomplete() with the results.</p>
  
  <pre><code>$('.section').on('focus', '#title-picker.unfetched', function(e) {
      var $titleSearch = $('[name="titlesMode"]:checked');
      var getTitles = $titleSearch.val() == "installmentTitles" ? Installment.GetAppList(selectedInstallment) : Installment.GetAllAppList();
      getTitles.done(function(result) { 
             //stuff happens here
  </code></pre>
  
  <p>Was focus triggered by a click in the input?</p>
  
  <p>or </p>
  
  <p>Was focus triggered by 'change' event attached to input[name="titlesMode"]</p>
  
  <pre><code>     }).fail(function(error){
       console.error(error);
      });        
  })
  .on('change', 'input[name="titlesMode"]', function() {
      $('#title-picker').addClass("unfetched");
      if ($('#title-picker').val() != '') $('#title-picker.unfetched').trigger('focus');
  
  
   });
  </code></pre>
  
  <p>I'm also triggering -with $.trigger('focus'), that triggers if the input has a value and fetches results again, depending on the search mode.</p>
  
  <p>I just need to figure out if the focus event was triggered by a mouse clicking in the input or if it was triggered by $.trigger().</p>
  
  <p>I found some code for differentiating the click event's origin but nothing for focus event :/</p>
  
  <p>Any ideas?</p>