一晩で覚えるjQueryの逆引き基礎サンプル7つ*ホームページを作る人のネタ帳 jQueryに書くとほってんとり入りできるらしいので便乗。というかリンク先で紹介されているサンプルコードにちょっと意義異議あり。 一個のサンプルは非常に単純な構造になっておりますゆえ、jQueryをすでにやったことがある人にとって必要ないものだということをあらかじめご了承くださいませ。 ということであれば、「jQueryらしい」書き方をした方が良いかなと思います。 で、僕ならこう書くってことで。 全般的に使われている$(document).ready(fn)は、$(fn)でショートカットできます。 $(document).ready(function(){alert('hoge');}) は、 $(function(){alert('hoge');}) こう書けると。 まあ、これはどうでもいいや。短く書けるって
via del.icio.us/popular Javascript Gamerで、BrickslayerというJavascriptで作ったブロック崩しゲームの作り方が公開されている。 開発環境は Firefox + Firebug + お好みのエディタ。 Javascript本体は、prototype.jsベースで、スプライト表示、アニメーション処理、キーボード入力、当たり判定、(Flash経由で)効果音などについてそれぞれソースつきで解説されている。 また、ハイスコア記録のほうはPHPによるサーバ側のスクリプトがちゃんと用意されている。 まだアルファリリースということだけれど、ページ上ではブロック崩しゲームがちゃんと動いている。ソースを一括してダウンロードすることもできる。 この記事は移転前の古いURLで公開された時のものですブックマークが新旧で分散している場合があります。移転前は現在
Ajaxの登場は、JavaScriptと言う言語にとって凄まじい変革をもたらしました。 それまでは、Webページに多少の動きを持たせて利便性を向上する、といった程度でしか認知されていなかったJavaScriptですが、今やそうではありません。次のような理由から、ブラウザ上で動作するリッチクライアントを作成するための、最も一般的な言語として捉えられています。 主要なブラウザのほぼ全てが標準でサポートし、しかも最初から有効になっている 厳しいセキュリティの下で動作するため、ユーザにとって安全 簡潔で柔軟な言語仕様により、短いコードで多くを実現できるうえ、可読性も高い フレームワークの整備による生産性の劇的な向上 非常に長い歴史を持つ技術であり、開発者の人口が非常に多い しかし、近年におけるJavaScriptの変化は目覚ましいものがあります。筆者自身のJavaScriptコードを見ても、この数
JSONとは何か? JSONとはJavaScript Object Notationの略で、XMLなどと同様のテキストベースのデータフォーマットです。 その名前の由来の通りJSONはJavaScriptのオブジェクト表記構文のサブセットとなっており、XMLと比べると簡潔に構造化されたデータを記述することができるため、記述が容易で人間が理解しやすいデータフォーマットと言えます。 なお、JSONは2006年に「RFC 4627(http://www.rfc-editor.org/rfc/rfc4627.txt)」として公開されています。 例としてXMLとJSONで同じデータを記述したものをリスト1とリスト2に示します(図1)。 リスト1のXMLではすべての情報をタグで囲んだテキストノードとして記述していますが、XMLでデータを表現する場合、データの記述方法として属性とテキストノードの使い分けが
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く