アイコンをクリックすると表示される小さなポップアップをjQueryで作成したいです。小さなウィンドウとボタンの間に直感的な接続ができるように、ポップアップの上隅をアイコンと重ねて表示します (画面の中央に表示される現在の動作とは対照的です)。これは、時計をクリックするとカレンダーが表示されるという wunderlist.com に似ています。カレンダー、テキスト ボックス、ボタンを備えたモーダルを作成したいと考えています。
jquery モーダルを表示することはできますが、その位置を制御することはできません。常に画面の中央に表示されます。jQuery UIでコードを使用しています
<script type="text/javascript">
$.fx.speeds._default = 100;
$(document).ready(function() {
$( "#dialog" ).dialog({
autoOpen: false,
show: "blind",
});
$( ".hold_btn" ).click(function() {
$( "#dialog" ).dialog( "open" );
return false;
});
});
</script>
<button class="btn btn-primary hold_btn" type="button">Button</button>
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>