Twitterがフロントエンドのアーキテクチャを見直し、Webページの読み込み速度を改善したことをブログで明らかにしています。 新しいアーキテクチャでは、これまでWebブラウザ上でJavaScriptの処理によって行ってきたWebページのレンダリングを見直し、サーバ側でレンダリング済みのHTMLページを送信し表示することにしています。これによってWebページの読み込みから最初のツイートの表示までの時間が大幅に短縮されることになりました。 When we shipped #NewTwitter in September 2010, we built it around a web application architecture that pushed all of the UI rendering and logic to JavaScript running on our users’
最近jQueryMobileを使う機会があり、つまづいたのでメモ。 jQueryMobileは1つのHTMLの中にrole属性を持ったdivを作成してあげることで、それらをページとして扱うことができるようになります。 ページ切り替えのアニメーションなんかもつけられるので 「おおっ!こりゃ便利!」 と余裕こいていたら、結局色々いじらなければならず… 色んな問題も後から後から…泣 まあそれは違う機会に書こうかなと思います… 今回はページ切り替え終わった時にイベントを起こす方法です。 jQueryMobileは先ほど書いたようにページ自体は一枚のHTMLなので、 コンテンツを切り替えた際にloadイベントを起こす ってことが出来なかったのです‥ それで遷移した際にJavascriptを実行するpageshowイベント なるものがあることを知りました。 $('[data-role="
本日始めて知ったのですがmobile safariではCSSのposition:fixedは使えないそうです。 よって、画面の一部分にボタンを固定して置いておく、というUIが作れない。 もちろんそれでは困るので、各種対策を試みている先達たちがおります。 色々調べてみましたが、「fixedできない?なら、しないでも大丈夫なようにすればいいじゃん」ということで、iscrollというjqueryプラグインを使うのがよさそうです。 iScroll これは、本来画面をタッチして指を滑らすとウィンドウ全体がスクロールされるのですが、このイベントを乗っ取ってしまい、ウィンドウがスクロールするのではなくて特定のdiv内がスクロールされるように、差し替えてしまうjqueryです。 fixedしたいオブジェクトをスクロールされるdivの外に置いておけば、まるでfixedされているかのように画面のスクロールに関
などという煽り気味なタイトルをついつけてしまいたくなる記事がGoogleCodeBlogに掲載されていました。 最初のほうはごく普通にJavaScriptを使ったRIAアプリケーションはどうしても起動が遅くなるため、それをどう減らすか、というテーマにそって書かれています。 方法として挙げられているのは、最初にすべてを読み込まず、モジュール単位で分割して遅延ローディングすること。ただし、それだけだと回線速度が遅く不安定なモバイル環境では問題が生じるためHTML5のキャッシュ機能を利用するといいとのこと。 遅延ローディングのためのさまざまな手法の得失や、例えばユーザーデータを読み込むときには動的ロードしない、というようにユーザーの操作を妨害しないよう留意することなどについても述べられていてそれだけでもノウハウとして十分に有意義なのですが、決め手として最後に出てくる方法がすごいです。 その方法と
jQselectable : make selectbox so useful > project home change skins:selectable | natural Default selectbox 1) 都道府県適用前 2) 都道府県 optgroupあり、selected属性なし、selectable 3) 都道府県 optgroupあり、selected属性あり、selectable 4) 都道府県 optgroupなし、改行指定、selectable 5) 日付、改行指定、selectable 年 月 日 Simplebox 6) 都道府県 optgroupなし、simpleBox 7) 日付、simpleBox 年 月 日 Using Callback 8) セレクタ、Callback
プロトタイプ function Animal(){}; Animal.prototype = { sleep : function(){}, walk : function(){ alert('noshi, noshi') } }; function Human(){}; Human.prototype = new Animal(); new Human().walk(); // noshi, noshi もっともポピュラだと思われる。 変型プロトタイプ Human.prototype.__proto__ = Animal.prototype; new Human().walk(); // noshi, noshi ほとんどのIEを除くJavaScript処理系で実行可能。裏ワザちっく。 エクステンド /** * extend function * @param {Object} s su
はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28
JavaScriptjQuery は CSS セレクタで要素を選んで処理できるのが魅力的ですね。そんな jQuery ですが、CSS セレクタの書き方次第で速度が大幅に変わってきます。ここでは jQuery の内部処理を疑似コードで示しつつ、jQuery を高速に使うためのポイントを5つに絞って紹介します。何度も同じセレクタを実行しないクラスだけを指定するのは禁止#id を積極的に使う途中までの結果を再利用する子供セレクタ(>)を使うと速くなることがある※ この記事は jQuery 1.2.6 のソースコードを元に記述しています1. 何度も同じセレクタを実行しない改善前 // 例題 1 $("div.foo").addClass("bar"); $("div.foo").css("background", "#ffffff"); $("div.foo").click(function(){
Despite there being several other decent jQuery Cheat Sheets out there, none were what I was looking for. I wanted: More than just a dump of method names Where callbacks receive arguments, make it clear what those are Where method functionality may be confusing, clarify it Explain confusing selector syntax Give simple examples on methods that are used often but the syntax may be easily forgotten S
Use jQueryは、JavaScriptのライブラリ「jQuery」とそのプラグインを使用したウェブサイトのショーケースです。
8のjQueryのすごいTIPS 原文:8 awesome JQuery tips and tricks 微妙なTIPSもあるのですが、役に立つのもあるのでご紹介。 target="_blank" のリンクの作成 XHTML 1.0 Strict ではtarget=blank属性が利用できない。そこでjQueryを利用して別ウィンドウを開く方法を紹介しよう。 $('a[@rel$='external']').click(function(){ this.target = "_blank"; }); <a href="http://www.lepinskidesign.com.br/" rel="external">lepinskidesign.com.br</a> [to-R補足] 実際に利用する際はjavascript部分を$(function(){...})などで包む必要があります。[
ヤフー株式会社は、2023年10月1日にLINEヤフー株式会社になりました。LINEヤフー株式会社の新しいブログはこちらです。LINEヤフー Tech Blog JavaScript と言うと普段自信をもって膨大なプログラムと格闘している諸氏もコード断片のはり付けに終始してしまうことも多いのではないでしょうか。かくいう私も検索エンジン(を使ってコードを書く)プログラマになっていることが多々あります。 JavaScript にあるこのプログラムの自作を妨げるのは、ブラウザごとに仕様が違ったりとか、正しいはずのコードが動作しなかったりと、プログラミング言語としての特殊性が挙げられると思います。特に目的実現の為に必要となる発想は他の言語と一線を画します。 今回は、 題材は、これです。 誰でも一度は使ったことがあるだろう灰色の説明文付きの入力欄ですね。 簡単な例 さて、作ってみましょう、ということ
24 Tooltipp-Scripts | Dr. Web Weblog Tooltipps, also Mini-PopUps, beharrscht jeder halbwegs moderne Browser. JavaScriptツールチップライブラリ24個。 カーソルを合わせた際などにヒントとしてポップアップしてサイトの使い勝手を向上させることの出来るツールチップライブラリが多数紹介されています。 Unobtrusive and Slightly Accessible CSS Tool Tips on Semi Transparent CSS Menus jTip – A jQuery Tool Tip AJAX-enabled Help-Balloons Tooltipps mit CSS und Javascript qTip BoxOver SuperNotes DHTML
jQueryを良くする25のTIPS ネタ元:Improve your jQuery - 25 excellent tips ちょっと多いですが、かなり良いTIPSがまとまっています。 Google AJAX Libraries APIを利用しよう Google AJAX Libraries APIを活用すればすばやくライブラリを読み込むことが出来ます。 <script src="http://www.google.com/jsapi"></script> <script type="text/javascript"> // Load jQuery google.load("jquery", "1.2.6"); google.setOnLoadCallback(function() { // Your code goes here. }); </script> 直接読み込むことも出来ます。
This file is part of the first edition of Eloquent JavaScript. Consider reading the third edition instead.
以前の記事で、ココログのヘッダ部分にメニューを設置した話を書きました。メニュー作成のHTMLを全部JavaScriptで記述し、外部ファイルに追い出してしまうことで、内容が変わっても「ブログへの反映」が必要なくなるというアイディアです。 ただ、このやりかただとJavaScriptが「document.write()」の嵐になってしまいますので、多少エレガントな方法を考えてみました。 # タイトル画像は特に記事に関係あるわけじゃないです(^-^;)。 基礎知識 JavaScriptファイルの中で行末に「\」を書くと、そのあとの改行が抑制され、「次の行もつながってるんだよ」という意味になります。 前回の例ではHTMLを1行書くたびに「document.write()」を使ってましたが、「\」を使うともう少し簡単に書けるみたいです。 具体例 今までの例と改善後の例を見てみます。 (1)今までの例
Web関連およびアプリケーション、映像関係、静止画素材、自動処理、4K/8K/ハイビジョン素材関連などを扱っています。 誤字脱字等、お気づきの点がありましたら、お気軽にメールをください。 この目次にないアプリケーション等の使い方などに関してはその他のリファレンス/アプリケーション...のページを参照してください。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く