サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
アメリカ大統領選
api.jquery.com
Description: Selects all elements that are the nth child of their parent in relation to siblings with the same element name. version added: 1.9jQuery( ":nth-of-type(index/even/odd/equation)" ) index: The index of each child to match, starting with 1, the string even or odd, or an equation ( eg. :nth-of-type(even), :nth-of-type(4n) ) Because jQuery's implementation of :nth- selectors is strictly de
Description: A factory function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function. version added: 1.5jQuery.Deferred( [beforeStart ] ) The jQuery.Deferred() factory creates a new deferred object. The jQuery.Deferred method can be passed
The .promise() method returns a dynamically generated Promise that is resolved once all actions of a certain type bound to the collection, queued or not, have ended. By default, type is "fx", which means the returned Promise is resolved when all animations of the selected elements have completed. Resolve context and sole argument is the collection onto which .promise() has been called. If target i
Description: Determine whether the argument is an array. version added: 1.3jQuery.isArray( obj )
.triggerHandler( eventType ) executes all handlers bound with jQuery for the event type. It will also execute any method called on{eventType}() found on the element. The behavior of this method is similar to .trigger(), with the following exceptions: The .triggerHandler( "event" ) method will not call .event() on the element it is triggered on. This means .triggerHandler( "submit" ) on a form will
The .prop() method gets the property value for only the first element in the matched set. It returns undefined for the value of a property that has not been set, or if the matched set has no elements. To get the value for each element individually, use a looping construct such as jQuery's .each() or .map() method. Attributes vs. Properties The difference between attributes and properties can be im
Description: For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. version added: 1.3.closest( selector )
Register a handler to be called when Ajax requests complete. This is an AjaxEvent.
All of the methods in this section manipulate the DOM in some manner. A few of them simply change one of the attributes of an element (also listed in the Attributes category), while others set an element’s style properties (also listed in the CSS category). Still others modify entire elements (or groups of elements) themselves—inserting, copying, removing, and so on. All of these methods are refer
Description: Provides a way to execute callback functions based on zero or more Thenable objects, usually Deferred objects that represent asynchronous events. version added: 1.5jQuery.when( deferreds ) If no arguments are passed to jQuery.when(), it will return a resolved Promise. If a single Deferred is passed to jQuery.when(), its Promise object (a subset of the Deferred methods) is returned by
Description: Encode a set of form elements as an array of names and values. version added: 1.2.serializeArray() The .serializeArray() method creates a JavaScript array of objects, ready to be encoded as a JSON string. It operates on a jQuery collection of forms and/or form controls. The controls can be of several types:
Description: Load a JavaScript file from the server using a GET HTTP request, then execute it. version added: 1.0jQuery.getScript( url [, success ] )
An optional list of space-separated flags that change how the callback list behaves. The $.Callbacks() function is internally used to provide the base functionality behind the jQuery $.ajax() and $.Deferred() components. It can be used as a similar base to define functionality for new components. $.Callbacks() supports a number of methods including callbacks.add(),callbacks.remove(), callbacks.fir
Given a jQuery object that represents a set of DOM elements, the .find() method allows us to search through the descendants of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .find() and .children() methods are similar, except that the latter only travels a single level down the DOM tree. The first signature for the .find()method accepts a selector
Description: Load data from the server and place the returned HTML into the matched elements. version added: 1.0.load( url [, data ] [, complete ] )
This feature and its documentation are in beta and subject to change before final release. Description: Take the first element in the matched set and render its content as a template, using the specified data. version added: 1.4.3.tmpl( [data,] [options] ) dataThe data to render. This can be any JavaScript type, including Array or Object. optionsAn optional map of user-defined key-value pairs. Ext
Return Values If no argument is passed to the .index() method, the return value is an integer indicating the position of the first element within the jQuery object relative to its sibling elements. If .index() is called on a collection of elements and a DOM element or jQuery object is passed in, .index() returns an integer indicating the position of the passed element relative to the original coll
jQuery’s event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler. Most properties from the original event are copied over and normalized to the new event object. jQuery.Event Constructor The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional. Check trigger‘s documentati
.trigger( eventType [, extraParameters ] )Returns: jQuery Description: Execute all handlers and behaviors attached to the matched elements for the given event type. version added: 1.0.trigger( eventType [, extraParameters ] )
Bind an event handler to the "change" event, or trigger that event on an element.
Bind an event handler to the "load" event, or trigger that event on an element.
The .attr() method gets the attribute value for only the first element in the matched set. To get the value for each element individually, use a looping construct such as jQuery's .each() or .map() method. Using jQuery's .attr() method to get the value of an element's attribute has two main benefits: Convenience: It can be called directly on a jQuery object and chained to other jQuery methods. Cro
Description: Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties. version added: 1.4.3jQuery.cssHooks The $.cssHooks object provides a way to define functions for getting and setting particular CSS values. It can also be used to create new cssHooks for normalizing CSS3 features such as box shadows and
The .on() method attaches event handlers to the currently selected set of elements in the jQuery object. As of jQuery 1.7, the .on() method provides all functionality required for attaching event handlers. For help in converting from older jQuery event methods, see .bind(), .delegate(), and .live(). To remove events bound with .on(), see .off(). To attach an event that runs only once and then remo
jQuery.sub()Returns: jQueryversion deprecated: 1.7, removed: 1.9 Description: Creates a new copy of jQuery whose properties and methods can be modified without affecting the original jQuery object. version added: 1.5jQuery.sub() There are two specific use cases for which jQuery.sub() was created. The first was for providing a painless way of overriding jQuery methods without completely destroying
All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery. jQuery 1.5 also includes a large rewrite of the Ajax module, which has a number of extensibility improvements. You can find out more about those improvements in the Extending Ajax documentation. Additionally, jQuery 1.5 includes a new Deferred callback management system you can learn m
The Deferred object, introduced in jQuery 1.5, is a chainable utility object created by calling the jQuery.Deferred() method. It can register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function. The Deferred object is chainable, similar to the way a jQuery object is chainable, but it has its own methods
These documentation topics concern the jQuery Templates plugin (jquery-tmpl), which can be downloaded from: http://github.com/jquery/jquery-tmpl. A template contains markup with binding expressions. The template is applied to data objects or arrays, and rendered into the HTML DOM. The beta1 version of jQuery Templates is available on CDN at: http://ajax.microsoft.com/ajax/jquery.templates/beta1/jq
The .each() method is designed to make DOM looping constructs concise and less error-prone. When called it iterates over the DOM elements that are part of the jQuery object. Each time the callback runs, it is passed the current loop iteration, beginning from 0. More importantly, the callback is fired in the context of the current DOM element, so the keyword this refers to the element. Suppose you
次のページ
このページを最初にブックマークしてみませんか?
『jQuery Documents Main Page - jQuery』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く