2012-03-26 88 views
0

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

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

回答

0

您可以创建内容的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