Build with Gemini, our largest and most capable AI model. Get an API key.
Galaxy Nexus(Android 4.2.2)とか他のAndroid4.1.2の端末で、e.preventDefault()しているにも関わらずclickイベントが呼ばれてしまうバグ? 背景 iScrollを使用しているサービスを一部のAndroid 4.2.2, 4.1.2端末で見ると、clickイベントが2回呼ばれてしまう。 どうも、iScroll内では、touchstartでe.preventDefault()して、touchendでclickイベントを発火しているのだが、デフォルトのclickと、iScrollのclickの二回呼ばれるらしい。 問題の端末 Galaxy Nexus(android4.2.2) SO-01E(android4.1.2) Nexus S(android 4.1.2) 対象のブラウザ WebView, 標準ブラウザ (Chromeは問題なし) 使
TypeScript 1.0 Today, we’re happy to announce TypeScript 1.0. First, we want to give a big “thank you!” to everyone who has helped us over the last year and a half to meet this goal. Together, we’ve grown a language, tools, and a community around creating large-scale JavaScript applications. To help grow this community further, we’re opening up TypeScript for contributions from the community start
$(selector).on('click', function(event) { }); くらいしか使ってこなかったのだけど、調べてみたらもっと便利に使える事を知ったのでメモ。多分on()だけじゃなくone()も同じかな。 イベントにネームスペースを付けられる $(selector).on('click.add-button', function(event) { }); $(selector).on('click.remove-button', function(event) { }); // click.remove-buttonだけ削除される $(selector).off('click.remove-button');
JavaScriptで書くデザインパターンが気になっているので、手始めに一番よく見ているであろうモジュール・パターンについていろいろ調べてみました。 なぜ使うの? モジュール・パターンは名前の通り、処理を他の処理とぶつからないように安全に切り離し、モジュールの形として提供する考え方です。YUI などの大規模なフレームワークから小さなライブラリにも取り入れられています。以下のようなメリットがあります。 グローバル変数を極力減らして、機能をモジュールの形で提供できる。 コードの成長に合わせて構造を作れる コードを見通しやすくする 要件に応じて追加、置き換え、削除ができる シンプルな書き方 Sample というオブジェクトを作って、いろいろ便利な機能をつけていきたい、という場合、下記のような書き方ができます。 var Sample = { name: 'sampleくん', age: '30',
(function(){...})()は、 (function($){ $.hoge = function() { }; })(jQuery) みたいに使われていたりするコード。GreasemonkeyとかjQueryのプラグインとか、あれこれ見かけることがあると思います。 この話題はいくつかWebでも取り上げられていますが何がどうなってんのかちょっと難しいですね。しかし、誰でも理解できるレベルではあります。というのも、こういう種の難しさは体系的な知識が備わっているか否かということなのです。 でも、この知識を体系化する作業って結構しんどくて、難しくて、まーハゲるほど悩むこともあるかもしれない。それはきっと、とても毛根に悪いかもしれない。スカルプDも真っ青の状況になるかもしれない。それは、悲しいことなのだと思う・・・っ! 毛根にはこれからもがんばってほしい!いつだって頭を温かいまなざしで見守
JSHintの設定を色々いじってみようとおもったので、 原文 http://www.jshint.com/docs/options/ を非常に雑に意訳。 主観を交えながら書いていたら、どこまでがJSHintのドキュメントでどこからが主観なのか判別のし難い悪文になっている。 http://www.jshint.com/docs/ の内容も若干含む。 JavaScriptの注意事項一覧として見てもよい内容だと思う(原文が)。 これらを有効にする方法は以下の3通りの様子。 jshintコマンドのオプションとして指定 jsファイルの先頭にコメント挿入 .jshintrcに設定を記述 Enforcing options これらにtrueを設定することで、JSHintはより厳しく警告を出すようになる。 bitwise ビット演算子^、|等を禁ずる。 JavaScriptにおいてビット演算子が必要になる
JSON Editor Online JSON Editor Online is the original and most copied JSON Editor on the web. Use it to view, edit, format, repair, compare, query, transform, validate, and share your JSON data. About JSON Editor Online JSON Editor Online is a versatile, high quality tool to edit and process your JSON data. It is one of the best and most popular tools around, has a high user satisfaction, and is c
必要ならどうぞ。 デモ jQueryでフォームの値を取得する方法をまとめ – jsdo.it – Share JavaScript, HTML5 and CSS jQueryでフォームの値を取得する方法をまとめ – jsdo.it – share JavaScript, HTML5 and CSS 共通:要素の探し方 input要素なんかにid振っちゃうのが一番なんだけど、属性セレクターを使うと楽な場合があります。つまり[name=xxx]で検索するやり方。 <form id="my-form"> <input type="text" name="my-text" value="This is text." /> </form>
AngularJS support has officially ended as of January 2022. See what ending support means and read the end of life announcement. Visit angular.io for the actively supported Angular. Why AngularJS? HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resu
v1.13.7 CDN URLs (Use with <script src="..."></script>) https://cdn.jsdelivr.net/npm/[email protected]/underscore-umd-min.js https://cdn.jsdelivr.net/npm/[email protected]/underscore-esm-min.js https://unpkg.com/[email protected]/underscore-umd-min.js https://unpkg.com/[email protected]/underscore-esm-min.js https://pagecdn.io/lib/underscore/1.13.7/underscore-umd-min.js https://pagecdn.io/lib/unde
皆さん、こんにちは。id:KenichiroMurataです。 今回はKnowledge Noteにて連載させて頂いていた 「試して学ぶBackbone.js入門」が全5回分公開されたため、そのまとめをしたいと思います。 記事のコンセプト タイトルに含めた通り、実際にコードを書いて試してみることでBackbone.jsの理解を深めることを一番の目的としています。 なので、ぜひ実際に記事の中に出てくるコードを書いて、動かして、コンソールのログや動作を確認することをおススメします。 各記事の概要 第1回 試して学ぶBackbone.js入門 Backbone.jsの概要から、インストール方法、Model、Collectionの基本を説明しています。 目次 はじめに セットアップ Modelの基本 Collectionの基本 Collectionの便利な関数 第2回 試して学ぶBackbone.
Backbone's only hard dependency is Underscore.js ( >= 1.8.3). For RESTful persistence and DOM manipulation with Backbone.View, include jQuery ( >= 1.11.0). (Mimics of the Underscore and jQuery APIs, such as Lodash and Zepto, will also tend to work, with varying degrees of compatibility.) Getting Started When working on a web application that involves a lot of JavaScript, one of the first things yo
写真画像やアイコンなどを配置したベタ塗りのボタンなどをサークル状にし、ホバーするとシールのようにぺらっとめくれるようにするスクリプトを紹介します。 実装は非常に簡単で、jQueryなどの他のスクリプトは必要ありません。 Sticker.js Sticker.js -GitHub Sticker.jsのデモ Sticker.jsの使い方 Sticker.jsのデモ デモはChrome, Safari, Firefox, Opera, IE10+でご覧ください。 上記のアニメーションは左からのぺらっですが、上下左右の全ての方向からぺらっができます。右のベタ塗りはめくるとシャドウが半透明で適用されます。 Sticker.jsのフッタ 最初のデモは写真画像なのでカーソルはアローですが、フッタのはリンクなのでポインターになっています。 Sticker.jsの使い方 Step 1: 外部ファイル 当ス
Fancybox #Fancybox is the ultimate JavaScript lightbox alternative that sets the standard for premium user experience in multimedia display. Supports images, videos, maps, inline content, iframes and any other HTML content. This is the fifth generation of Fancybox. Both Carousel and Panzoom components are used under the hood and that's what makes this project so unique. In addition, Fancybox is ea
Getting started Download a zip of the latest release (or any previous one) from the Github Releases page. Or install using npm: npm install lightbox2 --save Open up the zip file and take a peek at the barebones, working example that is included in the /examples folder. Ready to set Lightbox up on your page? Start by including the Lightbox CSS and Javascript. You can grab both these files from the
yuga.jsって? ウェブサイトを作る上で面倒な部分を自動で実装したり、ちょっとした機能を簡単に追加したりするJavaScriptです。jQueryを使って作られています。Web制作を優雅にするために作られました。 設置方法 まず、ファイル一式をダウンロードし、読み込みたいサイトの任意のフォルダに配置します。 yuga.jsを使いたいHTMLファイルのhead要素でjavascriptを読み込みます。 <link rel="stylesheet" href="css/thickbox.css" type="text/css" media="screen" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/thickbox.js"></s
JavaScriptのテスト自動化ツールとして知られるSeleniumに関する勉強会「第1回 日本Seleniumユーザーコミュニティ勉強会」が、1月18日に都内で開催されました。 (本記事は「JavaScriptテスト自動化ツールSeleniumのこれまでとこれから(前編)。第1回 日本Seleniumユーザーコミュニティ勉強会」の続きです) Appiumのアーキテクチャ
// ==ClosureCompiler== // @compilation_level SIMPLE_OPTIMIZATIONS // @output_file_name default.js // ==/ClosureCompiler== // ADD YOUR CODE HERE function hello(name) { alert('Hello, ' + name); } hello('New user');
指定したパターンによるDate->String、String->Dateの変換を行うライブラリです。 ソース Ver 1.1 : 2008/04/02 dateformat.js サンプル 「パターン」を入力し、「フォーマット」ボタンを押下すると、現在時刻を指定パターンによる文字列に変換します。 「パース」ボタンを押下すると、「文字列」を「パターン」に沿ってパースし、Dateオブジェクトに変換します。 使い方 本ライブラリを読み込んだ状態で、パターンを指定してDateFormatクラスを生成し、format(Date->String)/parse(String->Date)関数により変換を行います。 var dateFormat = new DateFormat("yyyy/MM/dd HH:mm:ss SSS"); var str = dateFormat.format(new Date
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く