クライアントサイドで、JavaScriptによるインクリメンタルサーチを行うためのライブラリを作ってみました。 incsearch.js - インクリメンタルサーチライブラリ 以前公開したsuggest.jsのように、クライアント側で初回に読み込んだデータを保持し、それを検索条件に応じて、JavaScriptで検索、表示を行っています。 本当は、もう少し揉んでから出そうかと思ったのですが、まとまった時間がなかなか取れず、いつになってもリリース出来ないままだったので、現段階でいったん出す事にしました。 特にパフォーマンスの部分で、まだ改善の余地ありだと思っているので、出来次第また更新いたします。
prototype.jsのものすごく簡単な使い方。 はてなダイアリーの方にprototype.jsでHTMLを汚さないロールオーバースクリプトというエントリーを書いたのだが、prototype.jsの入手方法やらすごく簡単な使い方がないようなので、書いてみます。 prototype.jsはJavaScriptのライブラリ(中身はJavaScriptです)で、これを使うとJavaScriptを組むのがかなり楽になるというものです。話題のAjaxのプログラミングも簡単にできます。 ライブラリは、 http://prototype.conio.net/ からダウンロードできますが、TOPページにあるファイルはちょっと古いものなので、Browse the darcs repositoryというリンクを辿り、 http://dev.conio.net/repos/prototype/dist/ から
Javascriptを少しでも自分で書いたことある人は、各種ブラウザ間の共通性・互換性の弱さにため息や頭痛を感じた人も少なくないのではないでしょうか サイト上にスクリプトが記載されていて、それをコピペして借用する方法もあるが、経験上こういうコードは意外と完成度が低く、自サイトでは挙動がおかしいということが多々ある。 こう思った人がブラウザ間の差を吸収したライブラリを誰か提供してくれているに違いないと思い探してみるとまず最初に引っかかったのがPrototype.js。 残念ながらこれは間違いではないが、目的がAjaxに重点を置いているため古いブラウザは問題外となっている。 ちなみに正式対応なIEバージョンは6以降と書いてある。 そしてやっと探しあてたのが以下で紹介されている「X Library」 http://www.cross-browser.com/ これの完成度は本当に素晴らし
Manage your digital assets in one place. Experience hassle-free data organization and secure sharing with our reliable file management solution, perfect for small teams and multinational corporations. Start now → Effortlessly Organize Your Digital Assets with Fluxiom Fluxiom is the ultimate digital asset management system, streamlining the organization of your marketing materials, photos, videos,
本家 Text::Hatena で HTML::Parser を用いている部分は実装できていません。 URL の自動リンクや HTML のエスケープなどは実装できていません。 Cookie を利用するようなサイトに text-hatena.js を利用するのはお勧めできません。 ライセンスは Text::Hatena と同等とします。 技術的なアレコレ Perl と JavaScript って意外と似てるよね、というところから出発しました。特に、Text::Hatena のソースコードはそのまま JavaScript に置き換えられるぐらいに洗練されたコードです。例えば、Hatena.pm の一部に次のようなソースがあるのですが sub parse { my $self = shift; my $text = shift or return; $self->{context} = Text
JavaScript de MVC SmalltalkのModel-View-Controllerフレームワーク(注)をJavaScriptで真似した簡単なクラスライブラリです。(って、JavaScriptにクラスはないんだった…) Model - データを保持するオブジェクトです。 現在のところValueModel, ListModel, MatrixModel, RecordSetModelがあります。 View - HTMLで表現されたGUI部品です。 DOM の HTMLElement をそのまま使います。 Controller - Modelの変化をViewに反映したり、ユーザーの入力をハンドリングしたりするオブジェクトです。 現在 InputBoxController, ListController, EditableTextController, EditableParagr
追記 2005-08-23 Using prototype.js v1.5.0 リファレンスがあったみたい。これを読んだ方がはるかに有益です。あー書くんじゃなかった。 はてなの人気者 id:naoya が「prototype.js でデザインパターン」というのをやってるんだけど、prototype.js の説明をしてくれなくて困る。前から「Rails の prototype.js は便利だ」というのを目にすることがあったので、ちょうどいい機会だってことで調べた。 http://prototype.conio.net/ ドキュメントが全然ない。ないこたないと思うのでご存知の方は教えてください。しょうがないのでコードを読むことに。 http://dev.conio.net/repos/prototype/src/ ここのを順次読みます。 base.js http://dev.conio.net
bookmarkletを作るとき、IEでは500文字ちょい、Firefoxでは2000文字ぐらい(?)の文字数制限がある。また、作った後に一行にまとめたり、デバッグしたりも大変面倒。でもそれがとても簡単な方法でどうにでもなることをインターフェイス!インターフェイス!の人に教わった。 javascript:(function(){var s=document.createElement("script");s.charset="UTF-8";s.src="http://example.com/example.js";document.body.appendChild(s)})(); createElementでscript要素を作って、その中にhttp://example.com/example.jsとソースを指定することによってそのJSを実行できる。WinIEとFirefoxでは確認済み。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く