JSConf US May 28th 2014 Video: https://www.youtube.com/watch?v=e4eE5VeO1_o
新人さんの JavaScript のコードレビューをしていて、 if 文の本体部分を波括弧で囲っていないコードを見つけた。 おれは本体が一行しかなくても必ず波括弧で囲うようにしており(そのほうがわかりやすいと思っているから)、できればそうして欲しいけど個人の好みを押し付けるのはよくないので、広く支持されているコーディングスタイルガイドの類いで同様の主張をしているものが無いか探した。 Google とか Mozilla とか GitHub あたりのドキュメントを眺めてみたが if 文の波括弧についてはっきり言及している箇所を見つけられずにいたら、該当するドキュメントをいくつか教えてもらった。 http://contribute.jquery.org/style-guide/js/#spacing if/else/for/while/try always have braces and alw
Quick Start Include jquery-japan-map.js after jQuery. Then $(selector).japanMap(options) method will create most simple clickable canvas map of prefectures of Japan. The $.japanMap method take an object as argument which defines options. At least, you may have to implement onSelect event handler, which runs when a prefecture of the map is clicked or touched. Here is most simple example. <!DOCTYPE
Node.js Native ESM への道 〜最終章: Babel / TypeScript Modules との闘い〜
最近Browserifyって単語を良く見るようになりました。 Browserifyをざっくり説明すると、 ブラウザ上でもNode.js用モジュールを使えるようにする ブラウザでもrequire()を使ったモジュール管理を使えるようにする という特徴があるようです。 browser(ブラウザ)+ fy(〜する)という単語からもNode.jsをブラウザ化するってニュアンスでしょうか。 require()といえばRequireJSも提供してますよね。 Browserify使うことでRequireJSを使わなくてもモジュール管理ができるようになりそうです。 Browserifyの使い方 まずは公式サイトに載ってるコードを試してみます。 browserify これはどうやらNode.js向けのモジュールをブラウザでも使えるようにするチュートリアルのようです。 まず作業ディレクトリを作成します。 $
<script src="../js/jquery-1.7.1.min.js"></script> <script src="../jquery.masonry.min.js"></script> <script src="../js/jquery.infinitescroll.min.js"></script> <script> $(function(){ var $tiles = $('#tiles').css({ opacity: 0 }); $tiles.imagesLoaded(function(){ $tiles.animate({ opacity: 1 }); $tiles.masonry({ itemSelector: '.tile' }); }); $tiles.infinitescroll({ navSelector : 'ul.pagination', nextSel
Fluxxor is a set of tools to facilitate building JavaScript data layers using the Flux architecture by reifying many of the core Flux concepts. It works particularly well in conjunction with React as the view layer, and contains a few helpers to make integration with React applications easier. The Flux architecture... ...makes it easier to reason about changes to your application's data ...eschews
2015-08-22 追記 1年半前に書いた記事ですが、この記事の方法は良くないそうなので、参考にしないでください。 twitterでご指摘いただいたのですが、モダンブラウザではkeyup, keydownなどではなくUI Events Specification (formerly DOM Level 3 Events)とInput Eventsの input イベントを見て処理すべき、IE8は対応するならIE8だけ別にわけて扱うべきでした。 2015-08-23 追記 IE8とIE9では input イベントは期待通りに機能しないそうです。 A near-perfect oninput shim for IE 8 and 9 – Ben Alpert で模擬実装を作っている方がいました。 Microsoft Support LifecycleによるとIE8とIE9は約半年後(2016-
Mobile webapps made easy. Download Get Started App.js is a lightweight JavaScript UI library for creating mobile webapps that behave like native apps, sacrificing neither performance nor polish.
jsdiff's diff functions all take an old text and a new text and perform three steps: Split both texts into arrays of "tokens". What constitutes a token varies; in diffChars, each character is a token, while in diffLines, each line is a token. Find the smallest set of single-token insertions and deletions needed to transform the first array of tokens into the second. This step depends upon having s
Morphing + Text = Morphext The simplest text rotator powered by jQuery and Animate.css Download (v2.4.4) Source (GitHub) Installation 1. Direct download link or via Bower: bower install Morphext --save 2a. Import CSS (Prerequisite: Animate.css): <link rel="stylesheet" href="bower_components/Morphext/dist/morphext.css"> 2b. Import JS (Prerequisite: jQuery): <script src="bower_components/Morphext/di
Getting started by reading the documentation, which also contains an introduction and a tutorial.
ServiceWorker解説 – オフラインWebアプリケーション開発技術の最前線 岩瀬 義昌(HTML5 Experts.jp編集部) 今月上旬5月8日に、W3CよりServiceWorkerの草案初版が提示されました。ServiceWorkerは、オフラインWebアプリケーションの開発者が問題と考える点を解決する、非常に魅力的な仕様です。日本語の情報がほとんどないこのタイミングで、HTML5 Expert.jp編集部が解説いたします! ServiceWorkerとは ServiceWorkerは、リソースの永続的なキャッシュを可能にする、およびWebアプリケーションのリソース要求の処理を可能にする新しい機能です。Webページを開く前であっても(ネットワークの接続/切断の有無にかかわらず)、独自の処理を挟み込めるのがポイントです。クライアント側に、一種のプロキシサーバがあるようにイメー
こんにちは、阪本です。 昨年末に、Springがメジャーバージョンアップして4.0になりましたね。 代表的な変更点を上げてみても、 コールバック関数のJava8ラムダ式対応 Java EE 6 & 7 対応 GroovyによるSpring定義の記述対応 WebSocket、SockJS、STOMP対応 非同期REST対応等のRESTインタフェース機能拡張 のように、大きな機能追加・変更が行われていますが、その中でも、最近流行りのWebSocketに対応したということで、少し触ってみました。 まずは実装 超シンプルなチャットプログラムを作ってみます。 (エラー処理等は割愛。) まずはサーバサイドから。 Mavenのpom.xmlのdependenciesに、Springの標準ライブラリに加えて、WebSocket用のライブラリ(spring-websocket)を定義します。 <depend
footerをウィンドウ下部に固定する『footerFixed.js』 footer部分を画面下部に固定するためのjsライブラリ『footerFixed.js』を作成しました。 フッターをコンテンツの内容量にかかわらずwindow下部に表示させるためのjsライブラリです。 サンプル 設置方法は head要素なのでfooterFixed.jsを読み込みます。 <script type="text/javascript" src="./footerFixed.js"></script> ウィンドウ下部に固定したい要素にid属性「footer」を付けます。 これでその要素をウインドウの下部に表示させることが可能です。 (ウインドウの下部というのがわかりにくいと思うのですが、内容量がウィンドウサイズを超える場合は通常通り、内容量がウィンドウサイズより小さい場合はウィンドウの下部に配置という意味です
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く