How to position a popup div based on the position of where the cursor clicks
<p>I am trying to position a popup div below:</p>

<pre><code>&lt;div style="display:none;height:200px;width:200px;border:3px solid green;" id="popup"&gt;Hi&lt;/div&gt;
</code></pre>

<p>based on the clicking of another div.  </p>

<p>I am running this on document .ready</p>

<pre><code>$('div#d').bind('click', function (event) {
var offset = $(this).offset();
$('#popup').css('left',offset.left);    
$('#popup').css('top',offset.top);
$('#popup').css('display','inline');        
});
</code></pre>

<p>but the above will not even display the div</p>
