ドットインストール代表のライフハックブログ
連載目次 ページのスクロール位置を取得/設定するには、scrollTopメソッド(垂直位置)/scrollLeftメソッド(水平位置)を使います。これらのメソッドは、引数valを指定した場合にはページのスクロール位置を設定し、引数valを省略した場合には現在のスクロール位置を取得します。 以下は、<div>要素で定義された領域をクリックすると、そのときどきでのスクロール位置をメッセージ表示したうえで、ページの左上隅にスクロール位置を強制的に移動します。 <script type="text/javascript"> $(function() { // <div id="obj">がクリックされたときの挙動を定義 $('#obj').click(function() { // ページ全体を表す要素を取得 var h = $('html, body'); // 現在のスクロール位置をダイアログ
jQueryとは、JavaScriptのコーディングを強力に支援するライブラリです。 $('.semooh a').hover( function(){ $(this).text('ヌ?'); }, function(){ $(this).text('ヌー'); } );
HTTP通信でページを読み込みます。 この関数はjQueryにおけるAJAX通信の基本部分で、実際には$.getや$.postといった関数を使った方が、容易に実装できます。 但し、これらの抽象化された関数は実装の容易さと引き換えに、エラー時のコールバックなどの複雑な機能を失っています。そのような処理を実装したい場合は、やはり基幹であるこの関数を用いる必要があります。 $.ajax関数は、戻り値として XMLHttpRequestオブジェクトを返します。殆どの場合、このオブジェクトを直接操作することは無いと思われますが、例えば投げてしまったリクエストを中断する場合など、必要であれば利用して下さい。 この関数は引数をひとつだけとりますが、実際にはハッシュで、キーと値の組み合わせにより多くのオプションを受け取ります。 以下にその一覧を載せますので、参考にして下さい。 async / boolea
2010/12/10 コース:元祖こってり 「元祖こってり」記事はネットエージェント旧ブログ[netagent-blog.jp]に掲載されていた記事であり、現在ネットエージェントに在籍していないライターの記事も含みます。 IE8+jQueryによるクロスドメイン通信とXDomainRequestラッパーの作成 こんにちは、ネットエージェント株式会社、研究開発部の長谷川です。 さっそくですが、みなさんは「Advent Calendar」をご存じでしょうか? Advent Calendar と言えば、一般的には、クリスマス(12月25日)までの残り日数をカウントダウンするカレンダーを思い浮かべるかもしれませんが、ここで紹介する Advent Calendar とは、様々な業界、技術方面で活躍されているプログラマ有志が、毎日交代で1つずつ技術的なトピックスを紹介する技術系Webイベントのことです
このところHTML5関連のモバイルアプリケーション開発について調べていて、先週の水曜日にはSwapSkills主催のイベント「jQueryモバイルで簡単! スマートフォンサイト作成」に参加してjQuery Mobileについて勉強してきました。 jQuery Mobileとは、jQueryのプラグインとして利用するモバイルアプリケーション用のライブラリです。そしてその驚異的なまでの簡単さは、これから業務用のモバイルアプリケーションの作り方を一変させてしまう可能性を感じさせます。 jQuery Mobileの大きな特徴は次の3つです。 1)HTMLを書くだけでモバイルアプリケーションができてしまう 2)モバイルのユーザーインターフェイス対応の部品が多く揃っている 3)iOS、Android、WebOS、Windows Moblie、Symbianなどクロスプラットフォーム対応である 具体的な
Captcha security check monodez.com is for sale Please prove you're not a robot View Price Processing
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く