title: Set bootstrap tooltip to AJAX call results
body: <p>I have a <a href="http://getbootstrap.com">bootstrap</a> tooltip that I want to load data from an AJAX requestion, with the text from the request being the <code>title</code>property of the tooltip.  My AJAX request works fine, but I have two problems:</p>
  
  <ol>
  <li>Why isn't the data from the AJAX call making its way into the tooltip?</li>
  <li>How can I use my <code>ttManager</code> object to encapsulate the tooltip's state?</li>
  </ol>
  
  <p>Currently, when the page first loads and I click on <code>#btnSubmit</code> in the console I see
  <code>success</code> and the correct data from the console.log(ttManager) line</p>
  
  <pre><code> $(document).ready(function () {
          //this object's title attribute will be the value of ttManager.title seen below
          var ttManager = {
              title: '',
              setTitle: function (data) {
                  this.title = data;
              }
          }
          var ajaxCall = function () {
              //this returns the top five results of text from a query
              $.ajax({
                  type: "POST",
                  contentType: "application/json",
                  url: "Service.asmx/GetDrugs",
                  dataType: "json",
                  success: function (data) {
                      console.log('success');
                      ttManager.title = data.d;
                      //inside this function I want to set ttManager.title equal to the data.d
                      console.log(ttManager);
  
  
  
  
                  },
                  error: function (xhr) {
                      console.log('failed: ' + xhr.status);
                  }
  
              });
  
  
          }
  
          $('#btnSubmit').tooltip({
              //reference to ajax call
              //title is the attribute responsible for displaying text in the tooltip
              //I need to use a reusable object to set the text property instead of referencing ajaxCall
              //would it be better if there below were title: ttManager.title?
              title: ajaxCall,
              trigger: 'click',
              placement: 'right'
          });
  
  
  
      });
  </code></pre>
  
  <p>I'm pretty sure that I need a callback function somewhere, but I'm not sure where.  Any future pointers would be appreciated, too.  Thanks.</p>