2012-03-26 85 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