当サイトでも使用しているページ内をスムーズにスクロールするスクリプトの紹介です。 スクリプトの概要 JSファイルのダウンロード ページの先頭へスムーズにスクロールさせる方法 ページ内の任意の場所にスムーズにスクロールさせる方法 メモ 更新履歴 横移動や別ページからスムーズにスクロールできる方法は、応用編です。 [JS]ページ内をスムーズにスクロールできるスクリプト(応用編) スクリプトの概要 ページの先頭や任意の要素に、スムーズにスクロールさせることができるスクリプトです。 動作環境 Win IE5, IE5.5, IE6, IE7, Firefox1.5, Firefox2, Opera8, Opera9, Safari3.01beta Mac Safari1.5, Safari2, Firefox1.5, Firefox2 使用条件 本スクリプトは、非商用利用に限りフリーで使用すること
(thanks to id:koyachi、del.icio.us/rtk2106) OOPとFPと。関数、オブジェクト、クロージャの使い分けについて考えます。 関数型が良いのか、オブジェクト指向が良いのか、知りたいと思っていました。色々なページを読み、現時点で一応の答えを得ました。 カウンタを例にして、関数、スコープ、オブジェクト、クロージャの順に見て行きます。関数関数は処理です。入力と出力があります。関数型プログラミングでは、関数同士の入力と出力を連結しプログラムが構成されます。 var current = 0; function next(v){ return v + 1 } function previous(v){ return v - 1 } ok( 1 == ( current = next(current) ) ); ok( 2 == ( current = next(cu
Example I've deliberately made the image quite a large filesize so you'll have a chance to see the 'loading…' message before it fades out. The code The photo is a straightforward image in a div. Each has an id: <div id='photoholder'> <img src='/images/ithaka.jpg' alt='Photo' id='thephoto' /> </div> The 'loading…' image is set as the background to the photoholder div, and the photoholder is sized t
ファイルサイズわずか10キロバイト、CSSの1から3、XPathをサポートし、Internet Explorer、Firefox、Safari、Operaで動作します。「JavaScriptのコードを書くのが楽しくなる」というのがモットーらしい。 ダウンロードや実際の例、使い方などの各種取り扱い説明は以下の通り。 jQuery: New Wave Javascript http://jquery.com/ 上記ページの「Run」をクリックするとその機能の一端を垣間見ることができます。面白い効果です。 その他のデモとしてはこんな感じでいろいろなところに使えます。特に一番下の「Example G」のボタンをクリックしてから本文の上にマウスを乗せると色が変わり、フェードしながら元に戻るというのはシンプルながら面白い。 JQuery http://codylindley.com/blogstuff
Ajaxはどのように実現されているのだろうか? こんな疑問に応えるべく、サンプルを挙げてみよう。Ajaxの基本は、単に「JavaScriptでHTTP通信をする」というだけに過ぎないことが分かる。 オンライン・ムックPlus「Web2.0で変わるWebプログラミングの常識」の第1回目では、Ajaxが使われる背景と、どのような場合に適しているかを解説した。 今回はサンプルアプリケーションを取り上げていこう。ポイントは、もっとも基本的な例に限定したことであり、開発者である読者が今すぐにでも既存のWebアプリケーションへ組み込むことができるよう配慮した点だ。 まず最初に、以下の図2に示す2つのテキストボックスに注目してほしい。その「和」と「差」をそれぞれ計算し、結果を埋め込むという処理を挙げてみよう。 「和」と「差」を計算する処理の部分は、サーバ側に用意したPHPプログラムで行うことにする(図3
What is jQuery? jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.
In case you don’t know it yet, Flickr is great. It is a lot of fun to upload, tag and caption photos and it is really handy to get a vast network of contacts through it. Using Flickr photos outside of it is a bit of a problem though. There is a Flickr API, and you can get almost every page as an RSS feed, but in general it is a bit tricky to use Flickr photos inside your blog posts or web sites. Y
Without a doubt, JavaScript has been making something of a comeback in the last year. If you’re involved in client-side development in any way at all, chances are that you’re finding yourself writing more JavaScript now than you have in a long time. If you learned most of your JavaScript back when DHTML was all the rage and before DOM Scripting was in vogue, there have been some big shifts in the
Lightboxes, Modal Windows and Tooltips for Prototype.js Tutorial API Resources Introduction By default, Control.Modal creates modal windows and lightboxes from any links/anchors elements on your pages. Since it attaches these behaviors to HTML that already has semantic meaning, it will degrade gracefully for browsers that do not support JavaScript, and is search engine friendly. It attaches in one
Hi there! This script is from 2003, and targets a flaw in IE6, which at its peak was a really popuplar browser. Today (oct 2011) it no longer is, and as such this script should not really be necessary anymore. Please try to convice your client, project manager or boss, that not every browser needs to display a website the exact same way; it is the content that matters. And if you really still need
Introduction This behavior adds support for the most powerful raster graphic format available to Internet Explorer. It is of course our all beloved PNG format I am talking about. This format can have an 8 bit alpha channel which allows the images to be semi transparent. Transparency allows images to have antialiased edges and this makes the images look more professional. Implementation The secret
Slideshow 2! is a javascript class for Mootools 1.2 to stream and animate the presentation of images on your website Slideshow 2! is a javascript class for Mootools 1.2 to stream and animate the presentation of images on your website. This page features some examples of how Slideshow might be used to enhance the presentation of images on your website. Please view the source of this page for usage
Back to Web Devout home Web browser standards support This document will summarize the level of support for web standards and maturing technologies in popular web browsers. It covers the Internet Explorer, Firefox, and Opera web browsers, with focus on the HTML, CSS, DOM, and ECMAScript technologies. Pick browsers to display Accessibility features Up Visitors with visual impairments may take advan
このページはHTML, CSS, JavaScriptのファイルを分離したサンプルを掲載しています(JavaScriptテクニックブックとして書籍としても購入 (アマゾン) できます)。また、prototype.js、Yahoo UI Library、Script.aculo.us、Adobe Spryなどのライブラリも使用しています。これらのライブラリに関しては、各ライブラリのページから必要なファイルをダウンロードしてください。 ミスや間違い、リンクエラーなどがありましたらopenspc@alpha.ocn.ne.jpまでお願いします。 4月7日 SpryのアコーディオンとパネルのIE6での表示不具合を修正しました。HTML 4 TransitionalではSpryは正常に動作しないためです。 9月29日 書籍の113番(264~265頁)でHTMLのコードが別のファイルのものになってい
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く