title: jQuery UI Tooltip with dynamic content
body: <p>I use jQuery UI Tooltip Widget and there is code:</p>
  
  <pre><code>  $(function() {$( document ).tooltip({  
      content: 'connecting',
      content:function(callback) {
              $.get('teacher.php?teacherid=' + link,{}, function(data) {
              callback(data);
          });
      },
  
    })});
  </code></pre>
  
  <p>On my page i have:</p>
  
  <pre><code>&lt;div title="" onmouseover="{link=1}"&gt;Alex Brown&lt;/div&gt;
  &lt;div title="" onmouseover="{link=2}"&gt;John Black&lt;/div&gt;
  </code></pre>
  
  <p>But it doesn't work. How can i send variable to JS that Alex Brown is teacher with ID=1, and John Black is teacher with ID=2?</p>
  
  <p>UPD:
  Well, it was fixed</p>
  
  <pre><code>  &lt;script&gt;
    $(function() {$( document ).tooltip({ 
      show: 0,
      hide: 0,
      items: 'teacher',
      content: 'connecting',
      content: function(callback) {
              var x=$(this).attr('id') 
              $.get('teacher.php?teacherid='+x,{}, function(data) {
              callback(data);
          });
      },
  
    })});
    &lt;/script&gt; 
  </code></pre>
  
  <p>And in HTML i now have:</p>
  
  <pre><code>&lt;teacher id="1"&gt;Alex Brown&lt;/teacher&gt;
  &lt;teacher id="2"&gt;John Black&lt;/teacher&gt;
  &lt;teacher id="3"&gt;Homer Simpson&lt;/teacher&gt;
  </code></pre>