jQueryでページ内に最初に現れるinputタグにフォーカスを当てたい場合(ただし、hiddenタグは除く)jQuery
Flashは多彩な表現を実現したり、クライアント環境に左右されたい機能を実現したりするのに便利な技術だ。最近では動画の再生はほぼFlashが独占している状態だ。だがデザインとプログラミングが融合している感があり、技術者にはあまり使われない技術でもある。 文字と図形を重ね合わせて表示 しかし表現の自由度は求めたい、そんな方はJavaScriptでできるFlashライクな技術を紹介しよう。それがPrimerだ。 今回紹介するフリーウェアはPrimer、jQueryとCanvasで実装するFlashライクな機能を実現するライブラリだ。ソースコードは公開されているが、ライセンスは明記されていなかったのでご注意いただきたい。 PrimerはjQueryとCanvasを組み合わせて図形や文字を描くことが出来る。初期の頃のFlashのような、簡単な図形を描き出すことが可能だ。APIもFlashライクに作
はじめまして、今月よりバシャログのメンバーになったfukasawaと申します。 まだまだ勉強中で至らぬ点も多々あるとは存じますが、生温く見守っていただけると幸いです。 本題です。社内で行われているjQuery勉強会のネタ探しのためにWeb DesigningのjQuery Lab.を読んでいたのですが、記事の中でinviewというjQueryプラグインが使われていました。 記事では「グラフを描画する領域がブラウザの表示領域内に入ったタイミングで、アニメーションを実行しグラフを描画する」という動作を行うためにこのプラグインが使われているのですが、inviewを使うことで、このように「ブラウザ上で見えたときに処理を実行する」という動作を実現できるようです。 jquery.inview 気になったので使い方を調べてみました。 簡単な使い方 1. jQueryとjquery.inview.jsを読
Meta See the related blog post: Under jQuery's Bonnet I was sick and tired of having to scroll through a raw copy of jQuery everytime I wanted to view a method's implementation... so I decided to have a go at creating a faster, more usable interface which would allow me to quickly traverse each method's source. It's dead simple. Type in a jQuery method name (then wait a bit) and the corresponding
※各メソッドにかいてある[条件]ってのは、タグ名やid、クラス名を指定するってことです。 条件を入れると、条件にあったものだけが取得されるようになります。 例:$(elem).parent("div.class-name, #id"); 通常のJavaScriptでの要素取得方法は→[JavaScript] 親要素・子要素・兄弟要素の取得方法 ■親要素の取得 □parent([条件]) 親要素の取得。 すぐ上の親要素のみ。さらに上の先祖要素にはさかのぼらない。 $(elem).parent("div"); 親要素がdivだったら親要素が取得できる。divじゃなければ空。 □parents([条件]) parent()と違い親より上の先祖要素までさかのぼる。 $(elem).parents(".class-name"); class-nameというクラス名がついた先祖要素のみ取得 □clos
以下のスライドを意訳したものです。Compress周りについては触れていません。「いやいや、最新の書き方だともっと良い書き方があるんだよ!」という方のコメントをお待ちしております! http://www.slideshare.net/paul.irish/perfcompression クエリをキャッシュする // 悪い例 var id = $("#content").data("id"); var itemId = $("#content").data("item-id"); // 良い例 var content = $("#content") var id = content.data("id"); var itemId = content.data("item-id"); // 悪い例 $.each(reallyLongArray, function(count, item) { v
こんにちは。 昼夜逆転が一周してやっと普通の生活に戻って来ました。れこです 最近、CoffeeScriptというJavaScriptのライブラリにハマっています。 半年前くらいに流行った、賛否両論なjsライブラリです。 非常にシンプルにjsを書くことができて、Ruby on Railsでも公式採用されています。 そのCoffeeScriptでjQueryのプラグインを1つ書いてみて、CoffeeScriptで開発していくことについて感じたことをメモします。 CoffeeScriptやjQueryプラグインの基礎については特に触れません。ご了承下さい。 CoffeeScriptとは CoffeeScriptはJavaScriptを楽にシンプルに書けるライブラリです。おおまかな特徴は、 文法はRubyやPythonに近い 関数呼び出しの際に引数の括弧を省略できる インデントでループや関数などの
画像スライドショーでjQueryプラグインの基本を学ぶ:jQuery×HTML5×CSS3を真面目に勉強(2)(1/4 ページ) はじめに この連載で取り扱っているjQueryはJavaScriptのライブラリエンジンです。 世の中には実にさまざまなプログラミング言語があります。昨今主流となっているものの大半は、オブジェクト指向プログラミング言語と呼ばれているものです。 代表的な例を挙げると、Java、C#、Ruby、Python、Objective-Cといったところでしょう。これらの言語はクラスベースというカテゴリに属しています。クラスベースはアプリケーションにおけるさまざまな機能をクラスと呼ばれる単位でキッチリと分割することで、プログラム全体をキレイに整理整頓できるという特徴を持っています。大規模な開発になるほど、この特徴が威力を発揮するため、先に挙げたプログラミング言語が積極的に採用
Event Capturing 各イベントを取得することもできます。 jQuery.panelSnapの使い方 Step 1: 外部ファイル スクリプトをhead内に外部ファイルとして記述します。 <head> ... <script src="/path/to/jquery.js"></script> <script src="/path/to/jquery.customEvents.js"></script> <script src="/path/to/jquery.panelSnap.js"></script> </head> Step 2: HTML コンテンツは一つずつsection要素(変更可能)で並列に配置します。 スタイルシートは各コンテンツ自由にしてください。 <body> <section>コンテンツ:1</section> <section>コンテンツ:2</sect
多分、知っている人にはいまさら何言ってんのとお叱りを受けそうな話ですが、知らんかったので備忘録的にメモ。 仕事で作っているサイトはjQueryのバージョン1.3.2を使っているのですが、いい加減新しいの使おうよということで、こつこつ1.9系に書き直していっています。 (そんなことやってるうちに1.10系が出てしまいました。時代の流れは早いなあ・・・) で、入力補助的な機能をもくもく実装してたのですが、↓のコードがなぜか意図した通りに動かないのです。 $('#フォームの名前').on('click', 'ボタン名', function(e){ $('チェックボックスを指定するセレクタ').attr('checked', true); }); ボタンを押すと指定したチェックボックスに自動でチェックを入れるというコードですね。 今まではこれで動いていたのですが、1.9.1に入れ替えたらなぜか動か
WordPressで作られたブログなどでスクロールして記事を読み終えた時に、その記事をシェアするボタン、記事へのコメント入力フォーム、メールニュースなどの告知を配置したパネルを下からアニメーションで表示するjQueryのプラグイン、いやWordPressのプラグインと言った方がいいのか、を紹介します。 デモページ:記事を読み終えたとこ パネルには左から、コメント、ソーシャルメディア、メールニュースが配置されており、これはカスタマイズできます。 jQuery Engageの使い方 Step 1: 外部ファイル 当スクリプトとスタイルシートを外部ファイルとして記述します。 ※WordPressなのでjquery.jsは既に利用していると思いますが、無ければ追加してください。 <script src="js/dist/jquery.engage.min.js" type="text/javasc
jQuery Tempura は jQuery 依存の簡単な Templating Engine です。 この記事のものや jQeury Plugin Registry などを調べたのですが、 自分の要望を満たすものが無いので、オレオレにしちゃいました。 普通のHTMLファイルの上から、正しいHTMLを維持したまま使える {{foo}} や <%= foo %> といったテンプレ変数を埋め込まなくて良い。AngularJS のようにHTML属性値でテンプレ変数とリンクする。 これは一言で言えば「HTMLがまんま残るのは良いことだ」という利点であるが、「別のテンプレートエンジンと併用が可能」という側面もある。 必要な部分だけを更新する 更新の度に、テンプレ全体を再生成しない。 テンプレ変数が足りなくても空白になったりしない、前の状態が残る。 なので、イベントハンドラを生かし易い。大体のケース
目次 jQuery入門 jQueryのインストール・簡単な使い方 クイズゲームの作り方 秘密の暗号を作ってみよう(たぬき暗号) アクションゲームを作ってみよう(ぬりかべ) 画像を使ったジグソーパズルを作ってみよう もぐらたたきっぽいゲーム ドラッグ可能なポップアップウインドウを作ろう jQuery UI Sortableで1ラインオセロゲーム ブラウザ全体をブロックしてみる Geolocation APIを使って都道府県のセレクトボックスを現在地に近い順にソートする 発生したイベントの状態を保持・保存する6つのパターン Ajaxを利用したシンプルなイメージギャラリーを作ってみる テーブルにページ送り(ページング)を実装してみる jQuery UI Draggableを使って付箋(sticky)を作ってみる カラムでソートできるテーブルを自作してみる テーブルを使ったシンプルなドット絵エディ
Multiple file upload: Allows to select multiple files at once and upload them simultaneously. Drag & Drop support: Allows to upload files by dragging them from your desktop or file manager and dropping them on your browser window. Upload progress bar: Shows a progress bar indicating the upload progress for individual files and for all uploads combined. Cancelable uploads: Individual file uploads c
a handy, loosely-coupled jQuery plugin for full-screen scrolling windows project root | -- css | -- | -- main.css (compiled) | -- js | -- | -- jquery.windows.js | -- scss | -- | -- main.scss | -- index.html This is a light bootstrap that sets up: - the basic SASS for sequential full screen windows - a jQuery plugin for managing their positions as the user scrolls The plugin simply opens up a handy
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く