jquery弹出输入文本插件下

问题描述:

我正在寻找jQuery插件,将打开输入文本下的html。 Jest就像一个日期选择器插件,在输入文本下打开一个包含日期的div,只是我需要能够自己创建内容。有这样的插件吗?jquery弹出输入文本插件下

我更喜欢使用jQuery ui,因为我已经使用了这个包。

您可以创建内容的DIV,然后使用jQuery UI的功能定位是:位置()

HTML:

<input type="text" id="yourTextBox" onFocus = "javascript:position()"/> 
<div id="Popup">The content that you want to see in your popup"</div> 

CSS:

#yourTextBox{ 

    } 
    div#Popup{ 

     position: absolute; 
     display: none; 

    } 

的Jquery:

function position() { 
$("#Popup").show(); 
     $("#Popup").position({ 
      of: $("#yourTextBox"), 
      my: "left top", 
      at: "left bottom" 
     }); 
    } 

Demo和文档:link

我以前用过这个http://code.drewwilson.com/entry/tiptip-jquery-plugin,你可以通过编程设置html内容并将它放在你想要的位置上/右/下/左。