This works but you have to click in the text-box again to hide it. Though this can be sorted out easily:
<div id="divPop" style="z-index:500;position:absolute;display:none;">
Hello World! This is Popup Div.
</div>
<input id="txt" type="text" value="" width="200px" height="50px"
style="border:2px solid #ffeeee;color:#eeeeff;background-color:#aaeeaa;"/>
<script type="text/javascript">
$(document).ready(function(){
$("#txt").popupDiv("#divPop");
});
</script>
jQuery.fn.popupDiv = function (divToPop){
var pos=$(this).offset();
var h=$(this).height();
ar w=$(this).width();
$(divToPop).css({ left: pos.left + w + 10, top: pos.top + h + 10 });
$(this).click(function(e){
$(divToPop).css({ left: pos.left + w + 10, top: pos.top + h + 10 });
if ($(divToPop).css('display') !== 'none') {
$(divToPop).hide();
}
else{
$(divToPop).show();
}
});
};