タグ

prototype.jsとjavascriptに関するStraynapのブックマーク (2)

  • prototype.jsを使おう:$()ファンクションの使い方: Recently Ajax

    コメント( 5 ) | トラックバック( 1 ) prototype.jsには、非常に多くの機能が備わっていますが、中でも非常に使いやすくて、それでいて一度使うと手放せなくなるのが、$()ファンクションです。例えば、Ajaxの場合には、よくフォームやレイヤーを操作するために id属性煮付けられた名前を次のように指定します。document.getElementById('xxx').value これを、$()ファンクションでは次のように書き表すことができます。$('xxx').valueたったこれだけですが、フォームやレイヤーの指定はプログラム中に何度も出てくる記述のため、非常に助かります。 さらに、$()ファンクションの場合は、以下の例のように、複数の要素をまとめて指定することもできます。var controls = $('xxx', 'yyy', 'zzz');こうすると、次のプログ

  • Lightbox 2

    Overview Lightbox is a simple, unobtrusive script used to overlay images on the current page. It's a snap to setup and works on all modern browsers. What's New in Version 2 Image Sets: group related images and navigate through them with ease Visual Effects: fancy pants transitions Backwards Compatibility: yes! How to Use Part 1 - Setup Lightbox 2 uses the Prototype Framework and Scriptaculous Effe

    Straynap
    Straynap 2006/03/30
    エフェクト邪魔だ。しばらく古い方でいいかな
  • 1