simple tooltips created using jquery 1.3.2
<p>I have difficult time figuring out, why this code doesn't work. My intention is to display a message when user cliks on tooltip div. After moving mouse cursor out of the div, the tooltip should close.
I need the simplest possble way of displaying a message on a single page. I need to use jquery 1.3.2.Can anybody help? Thank you</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript" src="/jquery/jquery-1.3.2.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;

$(document).ready(function(){

    $('.wrapper').live('click', showBox).live('mouseleave', hideBox);

    function showBox(e){
        var x = e.pageX + 20;
        var y = e.pageY + 20;
        $('.tooltip').fadeIn();
        $('.tooltip').offset({ left: x, top: y });
    }
});

function hideBox(){
    $('.tooltip').fadeOut();
}

&lt;/script&gt;
&lt;style&gt;
  .div{ margin:10px;padding:12px;
         border:2px solid #666;
         width:60px;
       }
  &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class="wrapper"&gt;sometext&lt;/div&gt;
&lt;div class="tooltip"&gt;tooltip1&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>EDIT: here is the working code by Juan Mendes <a href="http://jsfiddle.net/HUG2Z/3/" rel="nofollow">http://jsfiddle.net/HUG2Z/3/</a></p>
