- バックアップ一覧
- ソース を表示
- LITBoxの使い方サンプル は削除されています。
- 1 (2006-12-09 (土) 11:40:18)
- 2 (2006-12-09 (土) 12:11:36)
- 3 (2006-12-11 (月) 09:48:47)
- 4 (2007-06-23 (土) 16:01:00)
- 5 (2007-08-03 (金) 14:05:40)
- 6 (2007-08-26 (日) 16:46:49)
- 7 (2007-08-30 (木) 18:54:40)
- 8 (2007-09-07 (金) 16:52:26)
- 9 (2007-09-09 (日) 10:43:59)
- 10 (2007-09-14 (金) 03:00:27)
- 11 (2007-09-15 (土) 14:48:49)
- 12 (2007-09-18 (火) 03:59:20)
- 13 (2007-09-20 (木) 17:08:51)
- 14 (2007-09-21 (金) 23:54:48)
- 15 (2007-09-22 (土) 12:50:19)
- 16 (2007-09-24 (月) 01:18:03)
- 17 (2007-09-26 (水) 05:50:57)
- 18 (2007-09-26 (水) 15:20:34)
- 19 (2007-09-27 (木) 06:22:14)
- 20 (2007-09-28 (金) 04:24:45)
- 21 (2007-09-28 (金) 14:14:58)
- 22 (2007-09-28 (金) 18:12:44)
- 23 (2007-09-29 (土) 04:31:50)
- 24 (2007-09-30 (日) 09:14:00)
- 25 (2007-10-01 (月) 06:24:25)
- 26 (2007-10-01 (月) 15:09:37)
- 27 (2007-10-08 (月) 08:57:01)
LITBoxの使い方サンプル?
目次 †
概要 †
lightboxのような、同じページ内にBOXを表示させてコンテンツを見せる方法の
BOX内にHTMLが書けるもの。それがLITBoxです。
LITBoxの使い方について、サンプルを使って説明しています。
ダウンロード †
- Ryan J Lowe’s Dev Blog >> LITBox
http://www.ryanjlowe.com/?p=9
シンプルなサンプル †
- 単に別ページの内容を読み込んでBOX内に表示しているだけです。
- LITBoxの生成部分
new LITBox('http://staff.ark-web.jp/~takemura/public/js/litbox/sample1.html', {type:'window',overlay:true});
- 明示的に改行しますが、実際は改行させません
- 第1引数、別ページの内容を読み込んでくるURL
- 第2引数、Option値 (次でやります)
OptionによるBOXの制御 †
- 上の例では、読み込んだBOXの下がやけに長いのが気になりますね。
- LITBoxはOptionでBOXの大きさの制御が可能です。
- LITBoxの生成部分
new LITBox('http://staff.ark-web.jp/~takemura/public/js/litbox/sample1.html', {type:'window',width:400,height:230,left:1,draggable: true,resizable: true});
- 明示的に改行しますが、実際は改行させません
- 下記のOption設定をしています。
- width:400
- height:230
- left:1
- draggable: 可
- resizable: 可
- Option設定の詳細は下記を参照してください。
Option一覧 †
- Optionの一覧は下記の通りです (2006/12/08現在)
Option名 Option値 デフォルト値 備考 width ピクセル値を指定 600 pxとか書かなくて良い height ピクセル値を指定 500 同上 type 'window', 'alert', 'confirm'のいずれか 'window' func confirmで[yes]が押された場合に呼ばれる関数名 null confirmの場合のみ draggable BOXをドラッグできるようにするかどうか true resizable BOXをリサイズできるようにするかどうか true overlay オーバーレイを使用するかどうか true opacity 透明度を指定 1 0〜1で小数可。1が透明度なし left 左の位置を指定 false pxとか書かなくて良い
falseにすると中央になる
trueは左から 1pxになるが 0pxは指定できないtop 上の位置を指定 false 同上
- その他、「オーバーレイ部分を白じゃなく黒にしたい」などの要求はCSSを変更することで対応してください。
alert と confirm †
- 上の例では、type:'window' の場合の実装でした。
- つまり、非同期通信を利用して外部コンテンツをBOX内に表示させていました。
- 続いて、alert と confirm について説明します。
alertの場合 †
- LITBoxの生成部分
new LITBox('アークウェブは2006/11/15〜18に社員旅行に行ってきました。', {type:'alert',width:250,height:80,resizable:false});
- 明示的に改行しますが、実際は改行させません
- 第1引数、表示するメッセージ
- 第2引数、Option値 (type:'alert')
confirmの場合 †
- LITBoxの生成部分
new LITBox('サイパンには行ったことがありますか?', {type:'confirm',width:300,height:100,draggable:false, func:function(){alert('それは良かったですね')} });
- 明示的に改行しますが、実際は改行させません
- 第1引数、確認したいメッセージ
- 第2引数、Option値 (type:'confirm')
- func: には[yes]が押された場合に呼ばれる関数を指定できます。
- ここではJavaScriptのalert標準関数を使って文言を表示させています。
- confirmの使いどころは難しいところですが、alertはAjaxを使わない表示に適していると言えます。
LITBoxの使いどころは? †
- アークウェブビジネスブログを参照
- <a href= http://mutuo-giovane-coppia.greenglod.info >mutuo giovane coppia</a> <a href= http://case-affitto-isola-d-elba.2bbb.info >case affitto isola d elba</a> <a href= http://praga-ristorante.glodgreen.info >praga ristorante</a> <a href= http://carciofo.b222.info >carciofo</a> <a href= http://cancelli.b222.info >cancelli</a> <a href= http://finanziamento-bancario.glodgreen.info >finanziamento bancario</a> <a href= http://annuncio-musica.c333.info >annuncio musica</a> <a href= http://bollettino-dei-protesto.b222.info >bollettino dei protesto</a> <a href= http://sito-porno-gratis.glodgreen.info >sito porno gratis</a> <a href= http://scooter-motorino.b222.info >scooter motorino</a> -- Ben? 2007-06-23 (土) 16:00:29
- Hello! great idea of color of this siyte! -- Vilyamcn? 2007-08-03 (金) 14:05:35
- Hello! great idea of color of this siyte! -- Vilyamcn? 2007-08-03 (金) 14:05:39
- <a href= ></a> -- Sandra-hg? 2007-08-26 (日) 16:46:48
- http://antiwarboston.com/hot-porn-star-babes.html hot porn star babes -- Hordietn? 2007-08-30 (木) 18:54:39
- <a href= http://index17.quximij.cn >poppit</a> <a href= http://index10.tonicys.cn >russell dexter</a> <a href= http://index12.qucekeh.cn >height and accuracy</a> <a href= http://index3.javizat.cn >temari</a> <a href= http://index16.liruquk.cn >cannon</a> <a href= http://index19.liruquk.cn >182961.d.m1r.info</a> <a href= http://index12.kosegyz.cn >pornosexworld.info</a> <a href= http://index7.cybuwyr.cn >microsoft</a> <a href= http://index2.wujocyg.cn >metaphoris</a> <a href= http://index16.geqidyn.cn >easter cards from son-inlaw</a> -- Sandra-cw? 2007-09-07 (金) 16:51:26
- <a href= http://index17.quximij.cn >poppit</a> <a href= http://index10.tonicys.cn >russell dexter</a> <a href= http://index12.qucekeh.cn >height and accuracy</a> <a href= http://index3.javizat.cn >temari</a> <a href= http://index16.liruquk.cn >cannon</a> <a href= http://index19.liruquk.cn >182961.d.m1r.info</a> <a href= http://index12.kosegyz.cn >pornosexworld.info</a> <a href= http://index7.cybuwyr.cn >microsoft</a> <a href= http://index2.wujocyg.cn >metaphoris</a> <a href= http://index16.geqidyn.cn >easter cards from son-inlaw</a> -- Sandra-cw? 2007-09-07 (金) 16:51:38
- <a href= http://index17.quximij.cn >poppit</a> <a href= http://index10.tonicys.cn >russell dexter</a> <a href= http://index12.qucekeh.cn >height and accuracy</a> <a href= http://index3.javizat.cn >temari</a> <a href= http://index16.liruquk.cn >cannon</a> <a href= http://index19.liruquk.cn >182961.d.m1r.info</a> <a href= http://index12.kosegyz.cn >pornosexworld.info</a> <a href= http://index7.cybuwyr.cn >microsoft</a> <a href= http://index2.wujocyg.cn >metaphoris</a> <a href= http://index16.geqidyn.cn >easter cards from son-inlaw</a> -- Sandra-cw? 2007-09-07 (金) 16:52:26
- <a href= http://index4.zunugav.cn >lizard tattooart</a> <a href= http://index3.sagyfym.cn >berlin wall photos</a> <a href= http://index13.suxucet.cn >irish boiled dinner</a> <a href= http://index25.kahywun.cn >mapquecom</a> <a href= http://index24.wisetax.cn >vertigo</a> <a href= http://index11.zonoqoq.cn >louis armstrong</a> <a href= http://index21.viguxab.cn >wide waters village nc</a> <a href= http://index8.noquvyf.cn >chesapeake bay retrivers</a> <a href= http://index24.sukarez.cn >min ebikes</a> <a href= http://index22.koxulih.cn >new orleans french quarter resort</a> -- Sandra-tf? 2007-09-09 (日) 10:43:41
- <a href= http://index4.zunugav.cn >lizard tattooart</a> <a href= http://index3.sagyfym.cn >berlin wall photos</a> <a href= http://index13.suxucet.cn >irish boiled dinner</a> <a href= http://index25.kahywun.cn >mapquecom</a> <a href= http://index24.wisetax.cn >vertigo</a> <a href= http://index11.zonoqoq.cn >louis armstrong</a> <a href= http://index21.viguxab.cn >wide waters village nc</a> <a href= http://index8.noquvyf.cn >chesapeake bay retrivers</a> <a href= http://index24.sukarez.cn >min ebikes</a> <a href= http://index22.koxulih.cn >new orleans french quarter resort</a> -- Sandra-tf? 2007-09-09 (日) 10:43:53
- <a href= http://index4.zunugav.cn >lizard tattooart</a> <a href= http://index3.sagyfym.cn >berlin wall photos</a> <a href= http://index13.suxucet.cn >irish boiled dinner</a> <a href= http://index25.kahywun.cn >mapquecom</a> <a href= http://index24.wisetax.cn >vertigo</a> <a href= http://index11.zonoqoq.cn >louis armstrong</a> <a href= http://index21.viguxab.cn >wide waters village nc</a> <a href= http://index8.noquvyf.cn >chesapeake bay retrivers</a> <a href= http://index24.sukarez.cn >min ebikes</a> <a href= http://index22.koxulih.cn >new orleans french quarter resort</a> -- Sandra-tf? 2007-09-09 (日) 10:43:58