jQuery入門

トップ > jQuery

目次

jQueryとは

jQuery は、HTMLドキュメント操作、イベント操作、アニメーション、Ajax操作などをシンプルに操作することのできる JavaScriptライブラリで、オープンソース(GPL/MITのデュアルライセンス)として公開されています。本書では jQuery 1.9 をベースに紹介していきます。

jQuery API(カテゴリ順)

◆ Core - 基本
$(...) jQuery.xxx $(selector) $(html) $(callback) $.sub() $.holdReady() $.noConflict()
◆ Selector(Basic) - 基本セレクタ
$("*") $("element") $(".class") $("#id") $("selector1, selector2, selectorN")
◆ Selector(Hierarchy) - 継承セレクタ
$("ancestor descendant") $("parent > child") $("prev + next") $("prev ~ siblings")
◆ Selector(Attribute) - 属性セレクタ
[name] [name='value'] [name!='value'] [name~='value'] [name|='value'] [name^='value'] [name$='value'] [name*='value'] [...][...]
◆ Selector(Basic Filter) - 基本フィルタ
:even :odd :first :last :eq() :gt() :lt() :not() :focus :header :lang() :root :target :animated
◆ Selector(Content Filter) - コンテンツフィルタ
:contains() :empty :has() :parent
◆ Selector(Visibility Filter) - ビジビリティフィルタ
:hidden :visible
◆ Selector(Child Filter) - 子要素フィルタ
:first-child :first-of-type :last-child :last-of-type :nth-child() :nth-last-child() :nth-of-type() :nth-last-of-type() :only-child :only-of-type
◆ Selector(Form) - フォームフィルタ
:input :text :password :file :checkbox :radio :submit :reset :button :image :checked :disabled :enabled :selected
◆ Traversing(Tree Traversal) - 親子兄弟要素を取得する
.parent() .parents() .parentsUntil() .closest() .offsetParent() .children() .find() .siblings() .prev() .next() .nextAll() .prevAll() .prevUntil() .nextUntil()
◆ Traversing(Filtering) - 取得した要素から一部を取り出す
.filter() .first() .last() .eq() .slice() .has() .not()
◆ Traversing(Miscellaneous Traversing) - 要素参照系その他
.is() .map() .contents() .add() .end() .addBack() .andSelf()
◆ Event(Event Handler Attachment) - イベントハンドラを割り当てる
.bind() .unbind() .live() .die() .delegate() .undelegate() .on() .off() .one() .trigger() .triggerHandler()
◆ Event(Browser Events) - ブラウザイベント
.error() .resize() .scroll()
◆ Event(Document Loading) - ドキュメント読み込みイベント
.ready() .load() .unload()
◆ Event(Form Events) - フォーム関連イベント
.focus() .blur() .change() .select() .submit()
◆ Event(Keyboard Events) - キーボードイベント
.focusin() .focusout() .keydown() .keyup() .keypress()
◆ Event(Mouse Events) - マウスイベント
.click() .dblclick() .hover() .mouseenter() .mouseleave() .mouseover() .mouseout() .mouseup() .mousedown() .mousemove() .toggle()
◆ Event(Event Object) - イベントオブジェクト
event.type event.target event.currentTarget event.relatedTarget event.delegateTarget event.data event.pageX event.pageY event.which event.result event.metaKey event.namespace event.timeStamp event.preventDefault() event.isDefaultPrevented() event.stopPropagation() event.isPropagationStopped() event.stopImmediatePropagation() event.isImmediatePropagationStopped()
◆ Attributes(Attribute/Property) - 属性・プロパティを参照・設定する
.attr() .removeAttr() .prop() .removeProp()
◆ Attributes(HTML/Text/Value) - HTML文字列・テキスト・値を参照・設定する
.html() .text() .val()
◆ Attributes(Class) - クラスを参照・設定する
.addClass() .removeClass() .hasClass() .toggleClass()
◆ CSS - CSSプロパティを参照・設定する
.css() .height() .width() .innerHeight() .innerWidth() .outerHeight() .outerWidth() .offset() .position() .scrollLeft() .scrollTop() $.cssHooks
◆ Effects(Basic)
.show() .hide() .toggle()
◆ Effects(Fading)
.fadeIn() .fadeOut() .fadeTo() .fadeToggle()
◆ Effects(Sliding)
.slideUp() .slideDown() .slideToggle()
◆ Effects(Custom)
.animate() $.fx.interval $.fx.off .queue() $.queue() .dequeue() $.dequeue() .delay() .stop() .clearQueue()
◆ Manipulation(DOM Insertion, Inside)
.prepend() .append() .prependTo() .appendTo()
◆ Manipulation(DOM Insertion, Outside)
.before() .after() .insertBefore() .insertAfter()
◆ Manipulation(DOM Insertion, Around)
.wrap() .wrapAll() .wrapInner()
◆ Manipulation(DOM Replacement)
.replaceAll() .replaceWith()
◆ Manipulation(DOM Removal)
.remove() .detach() .empty() .unwrap()
◆ Manipulation(Copying)
.clone()
◆ Ajax(Shorthand Methods)
.load() $.get() $.post() $.getJSON() $.getScript()
◆ Ajax(Low-Level Interface)
$.ajax() $.ajaxSetup() $.ajaxPrefilter() $.ajaxTransport()
◆ Ajax(Global Ajax Event Handlers)
.ajaxStart() .ajaxSend() .ajaxSuccess() .ajaxError() .ajaxComplete() .ajaxStop()
◆ Ajax(Helper Functions)
.serialize() .serializeArray() $.param()
◆ Callbacks Object
$.Callbacks() callbacks.add() callbacks.remove() callbacks.empty() callbacks.has() callbacks.fire() callbacks.fireWith() callbacks.fired() callbacks.disable() callbacks.disabled() callbacks.lock() callbacks.locked()
◆ Miscellaneous(Collection Manipulation)
.each()
◆ Miscellaneous(DOM Element Methods)
.size() .get() .toArray() .index()
◆ Miscellaneous(Data)
.data() .removeData() $.removeData() $.hasData()
◆ Deferred
$.Deferred() deferred.resolve() deferred.resolveWith() deferred.reject() deferred.rejectWith() deferred.notify() deferred.notifyWith() deferred.done() deferred.fail() deferred.progress() deferred.always() deferred.then() deferred.isResolved() deferred.isRejected() deferred.state() deferred.promise() .promise() deferred.pipe() $.when()
◆ Utitilies
$.boxModel $.browser $.support $.data() $.trim() $.parseJSON() $.parseXML() $.each() $.grep() $.unique() $.makeArray() $.map() $.merge() $.extend() $.globalEval() $.type() $.contains() $.inArray() $.isArray() $.isEmptyObject() $.isFunction() $.isNumeric() $.isPlainObject() $.isWindow() $.isXMLDoc() $.noop() $.proxy() $.now()
◆ Internals
.jquery .context .selector .length $.error() .pushStack()

jQuery API(ABC順)

◆ 記号($)
$(...) $(selector) $(html) $(callback) $("*") $("element") $(".class") $("#id") $("selector1, selector2, selectorN") $("ancestor descendant") $("parent > child") $("prev + next") $("prev ~ siblings")
◆ 記号([)
[name] [name='value'] [name!='value'] [name~='value'] [name|='value'] [name^='value'] [name$='value'] [name*='value'] [...][...]
◆ A
.add() .addBack() .addClass() .after() $.ajax() .ajaxComplete() .ajaxError() $.ajaxPrefilter() .ajaxSend() $.ajaxSetup() .ajaxStart() .ajaxStop() .ajaxSuccess() $.ajaxTransport() .andSelf() .animate() :animated .append() .appendTo() .attr()
◆ B
.before() .bind() .blur() $.boxModel $.browser :button
◆ C
$.Callbacks() callbacks.add() callbacks.disable() callbacks.disabled() callbacks.empty() callbacks.fire() callbacks.fired() callbacks.fireWith() callbacks.has() callbacks.lock() callbacks.locked() callbacks.remove() .change() :checkbox :checked .children() .clearQueue() .click() .clone() .closest() $.contains() :contains() .contents() .context .css() $.cssHooks
◆ D
$.data() .data() .dblclick() $.Deferred() deferred.always() deferred.done() deferred.fail() deferred.isRejected() deferred.isResolved() deferred.notify() deferred.notifyWith() deferred.pipe() deferred.progress() deferred.promise() deferred.reject() deferred.rejectWith() deferred.resolve() deferred.resolveWith() deferred.state() deferred.then() .delay() .delegate() $.dequeue() .dequeue() .detach() .die() :disabled
◆ E
$.each() .each() .empty() :empty :enabled .end() .eq() :eq() $.error() .error() :even event.currentTarget event.data event.delegateTarget event.isDefaultPrevented() event.isImmediatePropagationStopped() event.isPropagationStopped() event.metaKey event.namespace event.pageX event.pageY event.preventDefault() event.relatedTarget event.result event.stopImmediatePropagation() event.stopPropagation() event.target event.timeStamp event.type event.which $.extend()
◆ F
.fadeIn() .fadeOut() .fadeTo() .fadeToggle() :file .filter() .find() .first() :first-child :first-of-type :first .focus() :focus .focusin() .focusout() $.fx.interval $.fx.off
◆ G
$.get() .get() $.getJSON() $.getScript() $.globalEval() $.grep() :gt()
◆ H
.has() :has() .hasClass() $.hasData() :header .height() :hidden .hide() $.holdReady() .hover() .html()
◆ I
:image .index() .innerHeight() .innerWidth() :input .insertAfter() .insertBefore() .is() $.inArray() $.isNumeric() $.isArray() $.isFunction() $.isEmptyObject() $.isPlainObject() $.isWindow() $.isXMLDoc()
◆ J
jQuery(...) jQuery.xxx .jquery
◆ K
.keydown() .keypress() .keyup()
◆ L
:lang() .last() :last-child :last-of-type :last .length .live() .load() .load() :lt()
◆ M
$.makeArray() $.map() .map() $.merge() .mousedown() .mouseenter() .mouseleave() .mousemove() .mouseout() .mouseover() .mouseup()
◆ N
.next() .nextAll() .nextUntil() $.noConflict() $.noop() .not() :not() $.now() :nth-child() :nth-last-child() :nth-last-of-type() :nth-of-type()
◆ O
:odd .off() .offset() .offsetParent() .on() .one() :only-child :only-of-type .outerHeight() .outerWidth()
◆ P
$.param() .parent() :parent .parents() .parentsUntil() $.parseJSON() $.parseXML() :password .position() $.post() .prepend() .prependTo() .prev() .prevAll() .prevUntil() .promise() .prop() $.proxy() .pushStack()
◆ Q
$.queue() .queue()
◆ R
:radio .ready() .remove() .removeAttr() .removeClass() $.removeData() .removeData() .removeProp() .replaceAll() .replaceWith() :reset .resize() :root
◆ S
.scroll() .scrollLeft() .scrollTop() .select() :selected .selector .serialize() .serializeArray() .show() .siblings() .size() .slice() .slideDown() .slideToggle() .slideUp() .stop() $.sub() .submit() :submit $.support
◆ T
:target .text() :text .toArray() .toggle() .toggle() .toggleClass() $.trim() .trigger() .triggerHandler() $.type()
◆ U
.unbind() .undelegate() .unload() $.unique() .unwrap()
◆ V
.val() :visible .width()
◆ W
$.when() .wrap() .wrapAll() .wrapInner()

Copyright (C) 2013 杜甫々
http://www.tohoho-web.com/js/jquery/index.htm