2012-03-26 5 views
0

入力テキストの下にhtmlを開くjQueryプラグインを探しています。 datepickerプラグインのような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" 
     }); 
    } 

デモドキュメント:link

関連する問題