jquery.balloon.js のダウンロードと使い方のページ jQuery UI の .show を使って effect(効果)、easing、duration を適宜指定して effect を使った表示効果を発揮します。
▼ マウスカーソルを上に重ねて下さい ● fade_swing ▼ 右からスライド ● slide_right_150 ▼ 点滅 ● pulsate_easeOutElastic ▼ 窓のブラインドを開けるように ● blind_easeInExpo
<script>
if ( !window.jQuery ) {
document.write("<"+"script src=\"//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js\"></"+"script>");
}
</script>
<script>
if ( !window.jQuery.ui ) {
document.write("<"+"link rel=\"stylesheet\" href=\"//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css\">");
document.write("<"+"script src=\"//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js\"></"+"script>");
}
if ( !window.jQuery.balloon ) {
document.write("<"+"script src=\"http://winofsql.jp/js/jquery.balloon.min.051.js\"></"+"script>");
}
</script>
<style>
.balloon_animate {
cursor: pointer;
}
</style>
<script>
var contents_text_animate = {
fade_swing: "fade_swing",
slide_right_150: "右からスライドしますが、右からの指定は追加オプション指定です。さらに、スライドの開始位置も指定しています",
pulsate_easeOutElastic: "点滅",
blind_easeInExpo: "窓のブラインド"
}
var animate_func = {
fade_swing: function(d) {
this.show( {
effect: "fade",
duration: d,
easing: "swing"
});
},
slide_right_150: function(d) {
this.show( {
effect: "slide", direction: "right", distance: 150,
duration: d,
easing: "swing"
});
},
pulsate_easeOutElastic: function(d) {
this.show( {
effect: "pulsate",
duration: d,
easing: "easeOutElastic"
});
},
blind_easeInExpo: function(d) {
this.show( {
effect: "blind",
duration: d,
easing: "easeInExpo"
});
}
}
$(function() {
$( ".balloon_animate" ).each( function() {
$( this ).balloon(
{
showDuration: 400,
showAnimation: animate_func[this.id],
contents: contents_text_animate[this.id],
position: "right",
tipSize: 20,
offsetY: 0,
offsetX: 30,
css: {
width: "200px",
height: "150px",
opacity: "1",
color: "#333",
fontSize: "16px",
borderRadius: "10px",
border: "solid 2px #A63814",
padding: "10px"
}
}
);
});
});
</script>
<pre>
<span class="balloon_animate" id="fade_swing">▼ マウスカーソルを上に重ねて下さい
● fade_swing</span>
<span class="balloon_animate" id="slide_right_150">▼ 右からスライド
● slide_right_150</span>
<span class="balloon_animate" id="pulsate_easeOutElastic">▼ 点滅
● pulsate_easeOutElastic</span>
<span class="balloon_animate" id="blind_easeInExpo">▼ 窓のブラインドを開けるように
● blind_easeInExpo</span>
</pre>
関連する記事
|
|
【jQueryの最新記事】
- clipboard.js で、2種類のクリップボード処理オブジェクトを作成して使い分ける
- 一般的な PHP のアップロードページに対して jQuery の $.ajax でファイルをアップロードする
- jQuery の $.ajax で JSON 文字列を WEB より取得して TABLE を作成する
- jQuery で DIV の中の DIV を縦横中央に配置する
- jQuery で ページ内の画像のリンク切れを探してテーブルに URL を表示する
- クリックした入力フィールド以外をブラックアウトする jQuery プラグイン
- FORM の内容を localStorage に保存する jQuery プラグイン
- tableMagic : 単純に JSON から TABLE、TR、TH、TR、TD を作成する jQuery のプラグイン
- 滑らかなスクロール(scroll bar)を提供する jQuery プラグイン jQuery.NiceScroll
- jQuery : F1 キーでヘルプを起動させないようにする
- jquery.balloon.js で、balloon をメッセージ表示に使う( ゲーム等で使う為 )
- jQuery プラグイン jquery.balloon.js で複数バルーンにそれぞれ別のコンテンツを設定する為には、.each を使う
- jQuery プラグイン jquery.balloon.js を使用する『画像バルーン』の処理 (Excel で作成した吹き出し)
- jQuery プラグイン jquery.balloon.js の外部からのコントロール
- NAVER : Image*After の城と教会編
- 親(parent) フレームに jQuery が無い場合に jQuery をインストールする。
- jQuery で書かれた、幻想的な動く星座のようなシーン
- jQuery の addClass で、CSS で作成するサイフの出来上がる過程を見れるようにしました
- jQuery/JavaScript でフルスクリーンAPI( スクロールしないし、こりゃあ、WebGL の為にあるような・・・ )
- CSS transition : jQuery の addClass と removeClass で変化を付ければいい。いや、これが一番よさそうだ。




























