思った JavaScript はすぐに実行してみましょう! ブラウザの URL 入力欄に javascript:(function() { /*実行したいコードを書く*/ })()FireBug を使ってる人は、コンソール開いて実行したいコードを書く。 たとえばこんなことができます。 これらの例は僕が日頃使っているものです。 グローバルで使える関数を列挙する(Firefox Only) FireBug用 for(var n in window) if(typeof window[n]=='function')console.log(n); URL用 javascript:(function(){var b='';for(var n in window)if(typeof window[n]=='function')b+=n+"\n";alert(b)})() Object.prototyp
Prototype.js や MochiKit や jQuery や dojo こういう便利なライブラリがたくさん出てきてとても便利になりました。 でもそのライブラリ本当に必要? たしかに、グループワーキングを行うにはこれらのライブラリは必須だと思います。 でも、ちょいスクリプトを作るのに .bind(this) や $ や each や Event.observe が必要でしょうか。 いささかオーバスペックな気がします。 実際に「このツール Prototype.js 必須かよ。こっちは MochiKit で作ってるのにぃ」とかってことも多々あります。 あれを使うためにあれとこれを読み込んで、これを使うためにこれも必要だな。こんな感じだとサイトはどんどん重いものになってしまします。。。orz そこで、原点回帰です。 ちょっとしたツールでライブラリ使うのはやめようよ!何も使わなくても Jav
MooTools is a collection of JavaScript utilities designed for the intermediate to advanced JavaScript developer. It allows you to write powerful and flexible code with its elegant, well documented, and coherent APIs. MooTools code is extensively documented and easy to read, enabling you to extend the functionality to match your requirements. Open Source LicenseMooTools libraries are released under
前回のエントリで触れたJSONP。初出はRemote JSON - JSONPというMochiKitの中の人によるエントリ(多分。一言で言うなら「JSONデータを括弧でくくった上でこっちが指定した文字列を頭につけて返してね?」というもの。文章で説明するとわけわからん。 つまり、 http://example.com/data.json?jsonp=beverly_hills とリクエストしたら、 beverly_hills({ foo: 'This is foo.', bar: 'This is bar.', foobar: 'This is foobar.' }); と返す。また、 http://example.com/data.json?jsonp=beverly_hills%5B90210%5D とリクエストしたら、 beverly_hills[90210]({ foo: 'This
Litebox Check out the front page If you haven't been to the front page in some time, check it out. I've started blogging about some tips and tricks. Expect some full featured scripts some time soon. What is it? Litebox is a modified version of Lightbox v2.0 created with one thing in mind, size reduction. Litebox utilizes the 3kb javascript library moo.fx in association with prototype.lite, giving
by Alessandro Fulciniti More than one year has passed from the first version of Nifty Corners. While it was more of a proof of concept, and the second version presented some big improvements, there was still something missing. So here I present Nifty Corners Cube, that are simpler and more flexible than the previous versions. Let's start. New features If you're new to Nifty Corners, I suggest to l
Reflection.js allows you to add reflections to images on your webpages. It uses unobtrusive javascript to keep your code clean. It works in all the major browsers - Internet Explorer 5.5+, Mozilla Firefox 1.5+, Safari, Google Chrome and Opera 9+. On older browsers, it'll degrade and your visitors won't notice a thing. Best of all, it's under 5KB. Reflect-o-matic See what reflection.js looks like o
探偵のバイトのきっかけは単純なもの。 たんなるアルバイトのつもりだった。 名古屋でアルバイトできるのは嬉しいことだけれど。 それが探偵事務所とは、思いもよらない。 名古屋は良いけれど、探偵事務所って、、、 そのころ、資格をとるための勉強を頑張って、 試験を受けたけれど、学科は通り、 実技を落ちてしまったわたしは、就職する気分になれなかった。 受験して3週間ほどで結果が届き、すぐさま再試験の申し込みはしたけれど、、、 ちょうど、3ヶ月。友達と一緒に名古屋の学校へ通う。 その間は、両親も快く協力してくれたのだが、さすがに試験に落っこちてしまうと、態度が冷たく急変した。 で、アルバイトを探すことにしたのだ。 1日中、いつ機嫌の悪くなるともしれない母親と顔を突き合わせるよりは、 少しでも稼ぐくらいの方がマシだと判断したから。 まだ、名古屋の学校の再試験も控えているし、そこまで一生懸命に仕事はしたく
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
iBox is a lightweight script that lets you overlay images and documents in a small dialog without a page reload. It's built to be easy to install and use, while offering great flexibility. The quick start shows example code and explains how to use it. TopImages iBox easily supports the standard overlay of images, in many sizes, and will automatically scale down the window if the browser's viewpane
我的春秋: 関連エントリー 2006-06-11: 振る舞い分離 JavaScript ライブラリ一覧(途中) 2006-06-10: 続 JavaScript ソースが HTML から消える日 2006-01-05: JavaScript ソースが HTML から消える日 lib. behaviour.js (v1.1) getElements BySelector cssQuery() jQuery prototype.js (v1.5+) 対応ブラウザ
Web2.0としてくくられるタイプの各種ネットサービス、いわゆるウェブアプリは以前とは比較にならないほど動的生成されるものが多く、結果としてものすごい負荷をシステムにかけるわけです。 というわけで、海外におけるデジカメ画像共有サービスの代表的なものである「Flickr」の開発者がJavaScriptを高速化する手法について解説しています。 Vitamin Features >> Serving JavaScript Fast 手順を分割して簡単にしてみたり、キャッシュを使ったり、転送量を圧縮して帯域を節約したりいろいろあるようです。なお、GIGAZINEはキャッシュシステムを採用して有効活用することで負荷を現在、当初の12分の1に抑えています。 また、こっちはリバースプロキシによる高速化手法。 ViSolve.com - Squid Support Service Apacheのモジュール
クラスを定義する方法です。考え付くだけでも、これだけたくさんの方法があります。やっぱり、 JavaScript って柔軟であり複雑な言語ですね。 ちなみに、以下のすべての例はこのクラスを定義しています。 ちなみに、僕は一番下の書き方ですね。 皆さんはどのようにプログラミングしていますか? プロトタイプを使わない。クロージャを使う。 // プロトタイプを使わない。 // クロージャを使う。 function Item(price) { this.showPrice = function() { alert(price); }; } プロトタイプを使わない。クロージャを使わない。 // プロトタイプを使わない。 // クロージャを使わない。 function Item(price) { this.price = price; this.showPrice = function() { aler
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く