表示する位置座標を指定できるポップアップを実装するプラグイン「bPopup」を紹介します。
jQueryプラグイン「bPopup」
このプラグインを使えば、クリックなどのさまざまなアクションでぶわっ!とアニメ効果で表示するポップアップ(モーダル)ウィンドウを簡単に実装することができます。
また、ポップアップを表示する位置座標や jQuery Easing plugin を使ったアニメーションにも対応しています。
それではデモページをご覧ください。
「bPopup」のデモ
デモのソース(HTML + jQuery)
< meta name = "description" content = "Shapeshift のデモでーす。" > |
< title >Shapeshift - jQueryプラグイン</ title > |
< button id = "demo-button" >クリック!</ button > |
< div id = "demo-popup" >ポップアップ!</ div > |
< script src = "http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js" ></ script > |
< script src = "jquery.bpopup.js" ></ script > |
$(document).ready(function() { |
$('#demo-button').bind('click', function(e) { |
$('#demo-popup').bPopup({ |
jsファイルのダウンロード、オプション詳細はこちらからどうぞ。