テーブルの表を伸縮させるjavascript「ElasticTable」
テーブルで多くの項目を作りたいけどスペースが・・・
という悩みは、このjavascriptで解消されそうです。
ElasticTableはテーブルで作成した各項目を自在に伸縮してくれます。

使用方法
ElasticTableからelastictable.jsとelastictable.cssをmootoolsからmootools.jsをダウンロードします。
<script src="http://yourdomain/mootools.js" type="text/javascript"></script>
<script src="http://yourdomain/elastictable.js" type="text/javascript"></script>
<link rel="stylesheet" href="http://yourdomain/elastictable.css"style type="text/css">
<script type="text/javascript">
window.addEvent('load', function(){
new ElasticTable({table:'id名'});
});
</script>
上記を記述したら、指定したid名をtableに付与すれば完成です。
*1×1のthにfixedwidth fixedheightを付与うることで、デフォルトに戻るように設定できます。
<th class="fixedwidth fixedheight" style="width:横幅;height:高さ;"></th>
オプション
minWidth: '', //最小幅:デフォルト4%
minHeight: '', //最小高さ:デフォルト4%
テーブルの表を伸縮させるjavascript「ElasticTable」サンプル
コメントする
記事作成:2007年12月 6日 12:18