JQuery

JQuery

package js-jquery

Available on js

Constructor

new ()

new (element:Element)

new (elementArray:EitherType<NodeList, Array<Element>>)

new (selection:JQuery)

new (callback:Function)

new (object:Dynamic)

new (html:String, attributes:Dynamic)

new (selector:String, ?context:EitherType<Element, JQuery>)

new (html:String, ?ownerDocument:Document)

Creates DOM elements on the fly from the provided string of raw HTML. OR Accepts a string containing a CSS selector which is then used to match a set of elements. OR Binds a function to be executed when the DOM has finished loading.

Variables

context:Element

The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document.

jquery:String

A string containing the jQuery version number.

read only length:Int

The number of elements in the jQuery object.

selector:String

A selector representing selector passed to jQuery(), if any, when creating the original set.

Methods

add (selector:String):JQuery

add (elements:Element):JQuery

add (html:String):JQuery

add (selection:JQuery):JQuery

add (selector:String, context:Element):JQuery

Create a new jQuery object with elements added to the set of matched elements-

addBack (?selector:String):JQuery

Add the previous set of elements on the stack to the current set, optionally filtered by a selector-

addClass (className:String):JQuery

addClass (_function:Int ‑> String ‑> String):JQuery

Adds the specified class(es) to each element in the set of matched elements-

after (_function:Int ‑> EitherType<Element, EitherType<String, JQuery>>):JQuery

after (_function:Int ‑> String ‑> EitherType<Element, EitherType<String, JQuery>>):JQuery

after (content:EitherType<Array<String>, EitherType<Array<JQuery>, EitherType<Element, EitherType<Array<Element>, EitherType<NodeList, EitherType<String, JQuery>>>>>>, ?content:EitherType<Array<String>, EitherType<Array<JQuery>, EitherType<Element, EitherType<Array<Element>, EitherType<NodeList, EitherType<String, JQuery>>>>>>):JQuery

Insert content, specified by the parameter, after each element in the set of matched elements-

ajaxComplete (handler:Event ‑> JqXHR ‑> Dynamic ‑> Void):JQuery

Register a handler to be called when Ajax requests complete- This is an AjaxEvent.

ajaxError (handler:Event ‑> JqXHR ‑> Dynamic ‑> String ‑> Void):JQuery

Register a handler to be called when Ajax requests complete with an error- This is an Ajax Event.

ajaxSend (handler:Event ‑> JqXHR ‑> Dynamic ‑> Void):JQuery

Attach a function to be executed before an Ajax request is sent- This is an Ajax Event.

ajaxStart (handler:Function):JQuery

Register a handler to be called when the first Ajax request begins- This is an Ajax Event.

ajaxStop (handler:Function):JQuery

Register a handler to be called when all Ajax requests have completed- This is an Ajax Event.

ajaxSuccess (handler:Event ‑> JqXHR ‑> Dynamic ‑> Dynamic ‑> Void):JQuery

Attach a function to be executed whenever an Ajax request completes successfully- This is an Ajax Event.

andSelf ():JQuery

Add the previous set of elements on the stack to the current set-

animate (properties:Dynamic, options:Dynamic):JQuery

animate (properties:Dynamic, ?duration:EitherType<Float, String>, ?easing:String, ?complete:Function):JQuery

Perform a custom animation of a set of CSS properties-

append (_function:Int ‑> String ‑> EitherType<Element, EitherType<String, JQuery>>):JQuery

append (content:EitherType<Array<String>, EitherType<Array<JQuery>, EitherType<Element, EitherType<Array<Element>, EitherType<NodeList, EitherType<String, JQuery>>>>>>, ?content:EitherType<Array<String>, EitherType<Array<JQuery>, EitherType<Element, EitherType<Array<Element>, EitherType<NodeList, EitherType<String, JQuery>>>>>>):JQuery

Insert content, specified by the parameter, to the end of each element in the set of matched elements-

appendTo (target:EitherType<Element, EitherType<Array<Element>, EitherType<String, JQuery>>>):JQuery

Insert every element in the set of matched elements to the end of the target-

attr (attributeName:String):String

attr (attributes:Dynamic):JQuery

attr (attributeName:String, value:EitherType<Float, String>):JQuery

attr (attributeName:String, _function:Int ‑> String ‑> EitherType<Float, String>):JQuery

Set one or more attributes for the set of matched elements- OR Get the value of an attribute for the first element in the set of matched elements-

before (_function:Int ‑> EitherType<Element, EitherType<String, JQuery>>):JQuery

before (_function:Int ‑> String ‑> EitherType<Element, EitherType<String, JQuery>>):JQuery

before (content:EitherType<Array<String>, EitherType<Array<JQuery>, EitherType<Element, EitherType<Array<Element>, EitherType<NodeList, EitherType<String, JQuery>>>>>>, ?content:EitherType<Array<String>, EitherType<Array<JQuery>, EitherType<Element, EitherType<Array<Element>, EitherType<NodeList, EitherType<String, JQuery>>>>>>):JQuery

Insert content, specified by the parameter, before each element in the set of matched elements-

bind (events:Dynamic):JQuery

bind (eventType:String, ?eventData:Dynamic, handler:Event ‑> Void):JQuery

bind (eventType:String, ?eventData:Dynamic, ?preventBubble:Bool):JQuery

Attach a handler to an event for the elements-

blur ():JQuery

blur (handler:Event ‑> Void):JQuery

blur (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"blur" JavaScript event, or trigger that event on an element.

change ():JQuery

change (handler:Event ‑> Void):JQuery

change (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"change" JavaScript event, or trigger that event on an element.

children (?selector:String):JQuery

Get the children of each element in the set of matched elements, optionally filtered by a selector-

clearQueue (?queueName:String):JQuery

Remove from the queue all items that have not yet been run-

click ():JQuery

click (handler:Event ‑> Void):JQuery

click (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"click" JavaScript event, or trigger that event on an element.

clone (?withDataAndEvents:Bool):JQuery

clone (?withDataAndEvents:Bool, ?deepWithDataAndEvents:Bool):JQuery

Create a deep copy of the set of matched elements-

closest (selector:String):JQuery

closest (selection:JQuery):JQuery

closest (element:Element):JQuery

closest (selector:String, ?context:Element):JQuery

closest (selectors:EitherType<Array<String>, EitherType<String, JQuery>>, ?context:Element):Array<Dynamic>

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. OR Get an array of all the elements and selectors matched against the current element up through the DOM tree.

contents ():JQuery

Get the children of each element in the set of matched elements, including text and comment nodes-

contextmenu ():JQuery

contextmenu (handler:Event ‑> Void):JQuery

contextmenu (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"contextmenu" JavaScript event, or trigger that event on an element.

css (propertyName:String):String

css (propertyNames:Array<String>):String

css (properties:Dynamic):JQuery

css (propertyName:String, value:EitherType<Float, String>):JQuery

css (propertyName:String, _function:Int ‑> String ‑> EitherType<Float, String>):JQuery

Set one or more CSS properties for the set of matched elements- OR Get the computed style properties for the first element in the set of matched elements-

data ():Dynamic

data (key:String):Dynamic

data (obj:Dynamic):JQuery

data (key:String, value:Dynamic):JQuery

Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute- OR Store arbitrary data associated with the matched elements-

dblclick ():JQuery

dblclick (handler:Event ‑> Void):JQuery

dblclick (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"dblclick" JavaScript event, or trigger that event on an element.

delay (duration:Int, ?queueName:String):JQuery

Set a timer to delay execution of subsequent items in the queue-

delegate (selector:String, events:Dynamic):JQuery

delegate (selector:String, eventType:String, handler:Event ‑> Void):JQuery

delegate (selector:String, eventType:String, eventData:Dynamic, handler:Event ‑> Void):JQuery

Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements-

dequeue (?queueName:String):JQuery

Execute the next function on the queue for the matched elements-

detach (?selector:String):JQuery

Remove the set of matched elements from the DOM-

die ():JQuery

die (events:Dynamic):JQuery

die (eventType:String, ?handler:String):JQuery

Remove event handlers previously attached using -live() from the elements-

each (_function:Int ‑> Element ‑> Void):JQuery

Iterate over a jQuery object, executing a function for each matched element-

inline elements ():JqEltsIterator

Haxe iterator.

empty ():JQuery

Remove all child nodes of the set of matched elements from the DOM-

end ():JQuery

End the most recent filtering operation in the current chain and return the set of matched elements to its previous state-

eq (index:Int):JQuery

eq (indexFromEnd:Int):JQuery

Reduce the set of matched elements to the one at the specified index-

error (handler:Event ‑> Void):JQuery

error (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"error" JavaScript event.

fadeIn (options:Dynamic):JQuery

fadeIn (?duration:EitherType<Float, String>, ?complete:Function):JQuery

fadeIn (?duration:EitherType<Float, String>, ?easing:String, ?complete:Function):JQuery

Display the matched elements by fading them to opaque-

fadeOut (options:Dynamic):JQuery

fadeOut (?duration:EitherType<Float, String>, ?complete:Function):JQuery

fadeOut (?duration:EitherType<Float, String>, ?easing:String, ?complete:Function):JQuery

Hide the matched elements by fading them to transparent-

fadeTo (duration:EitherType<Float, String>, opacity:Float, ?complete:Function):JQuery

fadeTo (duration:EitherType<Float, String>, opacity:Float, ?easing:String, ?complete:Function):JQuery

Adjust the opacity of the matched elements-

fadeToggle (options:Dynamic):JQuery

fadeToggle (?duration:EitherType<Float, String>, ?easing:String, ?complete:Function):JQuery

Display or hide the matched elements by animating their opacity-

filter (selector:String):JQuery

filter (elements:Element):JQuery

filter (selection:JQuery):JQuery

filter (_function:Int ‑> Element ‑> Bool):JQuery

Reduce the set of matched elements to those that match the selector or pass the function's test-

find (selector:String):JQuery

find (element:EitherType<Element, JQuery>):JQuery

Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element-

finish (?queue:String):JQuery

Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements-

first ():JQuery

Reduce the set of matched elements to the first in the set-

focus ():JQuery

focus (handler:Event ‑> Void):JQuery

focus (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"focus" JavaScript event, or trigger that event on an element.

focusin ():JQuery

focusin (handler:Event ‑> Void):JQuery

focusin (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"focusin" event.

focusout ():JQuery

focusout (handler:Event ‑> Void):JQuery

focusout (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"focusout" JavaScript event.

get ():Array<Element>

get (index:Int):Element

Retrieve one of the elements matched by the jQuery object. OR Retrieve the elements matched by the jQuery object.

has (selector:String):JQuery

has (contained:Element):JQuery

Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element-

hasClass (className:String):Bool

Determine whether any of the matched elements are assigned the given class.

height ():Float

height (value:EitherType<Float, String>):JQuery

height (_function:Int ‑> Int ‑> EitherType<Float, String>):JQuery

Set the CSS height of every matched element- OR Get the current computed height for the first element in the set of matched elements-

hide ():JQuery

hide (options:Dynamic):JQuery

hide (?duration:EitherType<Float, String>, ?complete:Function):JQuery

hide (duration:EitherType<Float, String>, ?easing:String, ?complete:Function):JQuery

Hide the matched elements-

hover (handlerInOut:Event ‑> Void):JQuery

hover (handlerIn:Event ‑> Void, handlerOut:Event ‑> Void):JQuery

Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements- OR Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements-

html ():String

html (htmlString:String):JQuery

html (_function:Int ‑> String ‑> String):JQuery

Get the HTML contents of the first element in the set of matched elements- OR Set the HTML contents of each element in the set of matched elements-

index ():Int

index (selector:String):Int

index (element:EitherType<Element, JQuery>):Int

Search for a given element from among the matched elements.

innerHeight ():Float

innerHeight (value:EitherType<Float, String>):JQuery

innerHeight (_function:Int ‑> Float ‑> EitherType<Float, String>):JQuery

Set the CSS inner height of each element in the set of matched elements- OR Get the current computed height for the first element in the set of matched elements, including padding but not border-

innerWidth ():Float

innerWidth (value:EitherType<Float, String>):JQuery

innerWidth (_function:Int ‑> Float ‑> EitherType<Float, String>):JQuery

Get the current computed inner width for the first element in the set of matched elements, including padding but not border- OR Set the CSS inner width of each element in the set of matched elements-

insertAfter (target:EitherType<Element, EitherType<Array<Element>, EitherType<String, JQuery>>>):JQuery

Insert every element in the set of matched elements after the target-

insertBefore (target:EitherType<Element, EitherType<Array<Element>, EitherType<String, JQuery>>>):JQuery

Insert every element in the set of matched elements before the target-

is (selector:String):Bool

is (selection:JQuery):Bool

is (elements:Element):Bool

is (_function:Int ‑> Element ‑> Bool):Bool

Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.

inline iterator ():JqIterator

Haxe iterator.

keydown ():JQuery

keydown (handler:Event ‑> Void):JQuery

keydown (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"keydown" JavaScript event, or trigger that event on an element.

keypress ():JQuery

keypress (handler:Event ‑> Void):JQuery

keypress (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"keypress" JavaScript event, or trigger that event on an element.

keyup ():JQuery

keyup (handler:Event ‑> Void):JQuery

keyup (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"keyup" JavaScript event, or trigger that event on an element.

last ():JQuery

Reduce the set of matched elements to the final one in the set-

live (events:Dynamic):JQuery

live (events:String, handler:Event ‑> Void):JQuery

live (events:String, ?data:Dynamic, handler:Event ‑> Void):JQuery

Attach an event handler for all elements which match the current selector, now and in the future-

load (handler:Event ‑> Void):JQuery

load (?eventData:Dynamic, handler:Event ‑> Void):JQuery

load (url:String, ?data:Dynamic, ?complete:String ‑> String ‑> JqXHR ‑> Void):JQuery

Bind an event handler to the .html?lang=en"load" JavaScript event. OR Load data from the server and place the returned HTML into the matched element.

map (callback:Int ‑> Element ‑> Dynamic):JQuery

Pass each element in the current matched set through a function, producing a new jQuery object containing the return values-

mousedown ():JQuery

mousedown (handler:Event ‑> Void):JQuery

mousedown (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"mousedown" JavaScript event, or trigger that event on an element.

mouseenter ():JQuery

mouseenter (handler:Event ‑> Void):JQuery

mouseenter (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element-

mouseleave ():JQuery

mouseleave (handler:Event ‑> Void):JQuery

mouseleave (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element-

mousemove ():JQuery

mousemove (handler:Event ‑> Void):JQuery

mousemove (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"mousemove" JavaScript event, or trigger that event on an element.

mouseout ():JQuery

mouseout (handler:Event ‑> Void):JQuery

mouseout (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"mouseout" JavaScript event, or trigger that event on an element.

mouseover ():JQuery

mouseover (handler:Event ‑> Void):JQuery

mouseover (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"mouseover" JavaScript event, or trigger that event on an element.

mouseup ():JQuery

mouseup (handler:Event ‑> Void):JQuery

mouseup (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"mouseup" JavaScript event, or trigger that event on an element.

next (?selector:String):JQuery

Get the immediately following sibling of each element in the set of matched elements- If a selector is provided, it retrieves the next sibling only if it matches that selector-

nextAll (?selector:String):JQuery

Get all following siblings of each element in the set of matched elements, optionally filtered by a selector-

nextUntil (?selector:String, ?filter:String):JQuery

nextUntil (?element:EitherType<Element, JQuery>, ?filter:String):JQuery

Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed-

not (selector:EitherType<Element, EitherType<Array<Element>, String>>):JQuery

not (selection:JQuery):JQuery

not (_function:Int ‑> Element ‑> Bool):JQuery

Remove elements from the set of matched elements-

off ():JQuery

off (event:Event):JQuery

off (events:Dynamic, ?selector:String):JQuery

off (events:String, ?selector:String, ?handler:Event ‑> Void):JQuery

Remove an event handler-

offset ():{top:Float, left:Float}

offset (coordinates:{top:Float, left:Float}):JQuery

offset (_function:Int ‑> {top:Float, left:Float} ‑> Dynamic):JQuery

Get the current coordinates of the first element in the set of matched elements, relative to the document- OR Set the current coordinates of every element in the set of matched elements, relative to the document-

offsetParent ():JQuery

Get the closest ancestor element that is positioned-

on (events:Dynamic, ?selector:String, ?data:Dynamic):JQuery

on (events:String, ?selector:String, ?data:Dynamic, handler:Event ‑> Rest<Dynamic> ‑> Void):JQuery

Attach an event handler function for one or more events to the selected elements-

one (events:String, ?data:Dynamic, handler:Event ‑> Void):JQuery

one (events:Dynamic, ?selector:String, ?data:Dynamic):JQuery

one (events:String, ?selector:String, ?data:Dynamic, handler:Event ‑> Void):JQuery

Attach a handler to an event for the elements- The handler is executed at most once per element per event type-

outerHeight (value:EitherType<Float, String>):JQuery

outerHeight (_function:Function):JQuery

outerHeight (?includeMargin:Bool):Float

Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or null if called on an empty set of elements. OR Set the CSS outer Height of each element in the set of matched elements.

outerWidth (value:EitherType<Float, String>):JQuery

outerWidth (_function:Function):JQuery

outerWidth (?includeMargin:Bool):Float

Get the current computed width for the first element in the set of matched elements, including padding and border. OR Set the CSS outer width of each element in the set of matched elements.

parent (?selector:String):JQuery

Get the parent of each element in the current set of matched elements, optionally filtered by a selector-

parents (?selector:String):JQuery

Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector-

parentsUntil (?selector:String, ?filter:String):JQuery

parentsUntil (?element:EitherType<Element, JQuery>, ?filter:String):JQuery

Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object-

position ():{top:Float, left:Float}

Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.

prepend (_function:Int ‑> String ‑> EitherType<Element, EitherType<String, JQuery>>):JQuery

prepend (content:EitherType<Array<String>, EitherType<Array<JQuery>, EitherType<Element, EitherType<Array<Element>, EitherType<NodeList, EitherType<String, JQuery>>>>>>, ?content:EitherType<Array<String>, EitherType<Array<JQuery>, EitherType<Element, EitherType<Array<Element>, EitherType<NodeList, EitherType<String, JQuery>>>>>>):JQuery

Insert content, specified by the parameter, to the beginning of each element in the set of matched elements-

prependTo (target:EitherType<Element, EitherType<Array<Element>, EitherType<String, JQuery>>>):JQuery

Insert every element in the set of matched elements to the beginning of the target-

prev (?selector:String):JQuery

Get the immediately preceding sibling of each element in the set of matched elements- If a selector is provided, it retrieves the previous sibling only if it matches that selector-

prevAll (?selector:String):JQuery

Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector-

prevUntil (?selector:String, ?filter:String):JQuery

prevUntil (?element:EitherType<Element, JQuery>, ?filter:String):JQuery

Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object-

promise (?type:String, ?target:Dynamic):Promise

Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.

prop (propertyName:String):Dynamic

prop (properties:Dynamic):JQuery

prop (propertyName:String, _function:Int ‑> Dynamic ‑> Dynamic):JQuery

prop (propertyName:String, value:Dynamic):JQuery

Set one or more properties for the set of matched elements- OR Get the value of a property for the first element in the set of matched elements-

pushStack (elements:EitherType<Array<Element>, NodeList>):JQuery

pushStack (elements:EitherType<Array<Element>, NodeList>, name:String, arguments:Array<Dynamic>):JQuery

Add a collection of DOM elements onto the jQuery stack-

queue (?queueName:String):Array<Void ‑> Void>

queue (?queueName:String, newQueue:Array<Void ‑> Void>):JQuery

queue (?queueName:String, callback:Function ‑> Void):JQuery

Show the queue of functions to be executed on the matched elements- OR Manipulate the queue of functions to be executed, once for each matched element-

ready (handler:Function):JQuery

Specify a function to execute when the DOM is fully loaded-

remove (?selector:String):JQuery

Remove the set of matched elements from the DOM-

removeAttr (attributeName:String):JQuery

Remove an attribute from each element in the set of matched elements-

removeClass (_function:Int ‑> String ‑> String):JQuery

removeClass (?className:String):JQuery

Remove a single class, multiple classes, or all classes from each element in the set of matched elements-

removeData (?name:String):JQuery

removeData (?list:EitherType<Array<String>, String>):JQuery

Remove a previously-stored piece of data-

removeProp (propertyName:String):JQuery

Remove a property for the set of matched elements-

replaceAll (target:EitherType<Array<Element>, EitherType<Element, EitherType<String, JQuery>>>):JQuery

Replace each target element with the set of matched elements-

replaceWith (newContent:EitherType<Element, EitherType<Array<Element>, EitherType<String, JQuery>>>):JQuery

replaceWith (_function:Function):JQuery

Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed-

resize ():JQuery

resize (handler:Event ‑> Void):JQuery

resize (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"resize" JavaScript event, or trigger that event on an element.

scroll ():JQuery

scroll (handler:Event ‑> Void):JQuery

scroll (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"scroll" JavaScript event, or trigger that event on an element.

scrollLeft ():Int

scrollLeft (value:Float):JQuery

Get the current horizontal position of the scroll bar for the first element in the set of matched elements- OR Set the current horizontal position of the scroll bar for each of the set of matched elements-

scrollTop ():Float

scrollTop (value:Float):JQuery

Set the current vertical position of the scroll bar for each of the set of matched elements- OR Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element-

select ():JQuery

select (handler:Event ‑> Void):JQuery

select (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"select" JavaScript event, or trigger that event on an element.

serialize ():String

Encode a set of form elements as a string for submission.

serializeArray ():Array<Dynamic>

Encode a set of form elements as an array of names and values.

show ():JQuery

show (options:Dynamic):JQuery

show (?duration:EitherType<Float, String>, ?complete:Function):JQuery

show (duration:EitherType<Float, String>, ?easing:String, ?complete:Function):JQuery

Display the matched elements-

siblings (?selector:String):JQuery

Get the siblings of each element in the set of matched elements, optionally filtered by a selector-

size ():Int

Return the number of elements in the jQuery object.

slice (start:Int, ?end:Int):JQuery

Reduce the set of matched elements to a subset specified by a range of indices-

slideDown (options:Dynamic):JQuery

slideDown (?duration:EitherType<Float, String>, ?complete:Function):JQuery

slideDown (?duration:EitherType<Float, String>, ?easing:String, ?complete:Function):JQuery

Display the matched elements with a sliding motion-

slideToggle (options:Dynamic):JQuery

slideToggle (?duration:EitherType<Float, String>, ?complete:Function):JQuery

slideToggle (?duration:EitherType<Float, String>, ?easing:String, ?complete:Function):JQuery

Display or hide the matched elements with a sliding motion-

slideUp (options:Dynamic):JQuery

slideUp (?duration:EitherType<Float, String>, ?complete:Function):JQuery

slideUp (?duration:EitherType<Float, String>, ?easing:String, ?complete:Function):JQuery

Hide the matched elements with a sliding motion-

stop (?clearQueue:Bool, ?jumpToEnd:Bool):JQuery

stop (?queue:String, ?clearQueue:Bool, ?jumpToEnd:Bool):JQuery

Stop the currently-running animation on the matched elements-

submit ():JQuery

submit (handler:Event ‑> Void):JQuery

submit (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"submit" JavaScript event, or trigger that event on an element.

text ():String

text (text:EitherType<Float, EitherType<Bool, String>>):JQuery

text (_function:Int ‑> String ‑> String):JQuery

Set the content of each element in the set of matched elements to the specified text- OR Get the combined text contents of each element in the set of matched elements, including their descendants-

toArray ():Array<Element>

Retrieve all the elements contained in the jQuery set, as an array.

toggle (display:Bool):JQuery

toggle (options:Dynamic):JQuery

toggle (?duration:EitherType<Float, String>, ?complete:Function):JQuery

toggle (duration:EitherType<Float, String>, ?easing:String, ?complete:Function):JQuery

toggle (handler:Event ‑> Void, handler:Event ‑> Void, ?handler:Event ‑> Void):JQuery

Bind two or more handlers to the matched elements, to be executed on alternate clicks- OR Display or hide the matched elements-

toggleClass (className:String):JQuery

toggleClass (?state:Bool):JQuery

toggleClass (className:String, state:Bool):JQuery

toggleClass (_function:Int ‑> String ‑> Bool ‑> String, ?state:Bool):JQuery

Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument-

trigger (eventType:String, ?extraParameters:Dynamic):JQuery

trigger (event:Event, ?extraParameters:Dynamic):JQuery

Execute all handlers and behaviors attached to the matched elements for the given event type-

triggerHandler (eventType:String, ?extraParameters:Dynamic):Dynamic

triggerHandler (event:Event, ?extraParameters:Dynamic):Dynamic

Execute all handlers attached to an element for an event.

unbind ():JQuery

unbind (event:Event):JQuery

unbind (eventType:String, _false:Bool):JQuery

unbind (eventType:String, ?handler:Event ‑> Void):JQuery

Remove a previously-attached event handler from the elements-

undelegate ():JQuery

undelegate (namespace:String):JQuery

undelegate (selector:String, eventType:String):JQuery

undelegate (selector:String, events:Dynamic):JQuery

undelegate (selector:String, eventType:String, handler:Event ‑> Void):JQuery

Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements-

unload (handler:Event ‑> Void):JQuery

unload (?eventData:Dynamic, handler:Event ‑> Void):JQuery

Bind an event handler to the .html?lang=en"unload" JavaScript event.

unwrap ():JQuery

unwrap (?selector:String):JQuery

Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place-

val ():Dynamic

val (value:EitherType<Float, EitherType<Array<String>, String>>):JQuery

val (_function:Int ‑> String ‑> String):JQuery

Set the value of each element in the set of matched elements- OR Get the current value of the first element in the set of matched elements-

width ():Float

width (value:EitherType<Float, String>):JQuery

width (_function:Int ‑> Int ‑> EitherType<Float, String>):JQuery

Set the CSS width of each element in the set of matched elements- OR Get the current computed width for the first element in the set of matched elements-

wrap (wrappingElement:EitherType<Element, EitherType<String, JQuery>>):JQuery

wrap (_function:Int ‑> EitherType<String, JQuery>):JQuery

Wrap an HTML structure around each element in the set of matched elements-

wrapAll (wrappingElement:EitherType<Element, EitherType<String, JQuery>>):JQuery

wrapAll (_function:Void ‑> EitherType<String, JQuery>):JQuery

Wrap an HTML structure around all elements in the set of matched elements-

wrapInner (wrappingElement:EitherType<Element, EitherType<String, JQuery>>):JQuery

wrapInner (_function:Int ‑> String):JQuery

Wrap an HTML structure around the content of each element in the set of matched elements-

Static variables

static boxModel:Bool

States if the current page, in the user's browser, is being rendered using the W3C CSS Box Model. This property was removed in jQuery 1.8. Please try to use feature detection instead.

static browser:Dynamic

Contains flags for the useragent, read from navigator.userAgent. This property was removed in jQuery 1.9 and is available only through the jQuery.migrate plugin. Please try to use feature detection instead.

static cssHooks:Dynamic

Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.

static cssNumber:Dynamic

An object containing all CSS properties that may be used without a unit. The .css() method uses this object to see if it may append px to unitless values.

static fn:Dynamic

An alias to jQuery.prototype.

static fx:{off:Bool, interval:Float}

static support:Dynamic

A collection of properties that represent the presence of different browser features or bugs. Intended for jQuery's internal use; specific properties may be removed when they are no longer needed internally to improve page startup performance. For your own project's feature-detection needs, we strongly recommend the use of an external library such as Modernizr instead of dependency on properties in jQuery.support.

Static methods

static Callbacks (flags:String):Callbacks

A multi-purpose callbacks list object that provides a powerful way to manage callback lists.

static Deferred (?beforeStart:Deferred ‑> Void):Deferred

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-

static ajax (?settings:Dynamic):JqXHR

static ajax (url:String, ?settings:Dynamic):JqXHR

Perform an asynchronous HTTP (Ajax) request.

static ajaxPrefilter (?dataTypes:String, handler:Dynamic ‑> Dynamic ‑> JqXHR ‑> Void):Void

Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().

static ajaxSetup (options:Dynamic):Void

Set default values for future Ajax requests. Its use is not recommended.

static ajaxTransport (dataType:String, handler:Dynamic ‑> Dynamic ‑> JqXHR ‑> Void):Void

Creates an object that handles the actual transmission of Ajax data.

static contains (container:Element, contained:Element):Bool

Check to see if a DOM element is a descendant of another DOM element.

static data (element:Element):Dynamic

static data (element:Element, key:String):Dynamic

static data (element:Element, key:String, value:Dynamic):Dynamic

Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element. OR Store arbitrary data associated with the specified element. Returns the value that was set.

static dequeue (element:Element, ?queueName:String):Void

Execute the next function on the queue for the matched element.

static each (array:Array<Dynamic>, callback:Int ‑> Dynamic ‑> Void):Dynamic

static each (object:Dynamic, callback:String ‑> Dynamic ‑> Void):Dynamic

A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.

static error (message:String):Void

Takes a string and throws an exception containing it.

static escapeSelector (selector:String):String

Escapes any character that has a special meaning in a CSS selector.

static extend (target:Dynamic, ?object1:Dynamic, ?objectN:Dynamic):Dynamic

static extend (?deep:Bool, target:Dynamic, object1:Dynamic, ?objectN:Dynamic):Dynamic

Merge the contents of two or more objects together into the first object.

static get (settings:Dynamic):JqXHR

static get (url:String, ?data:Dynamic, ?success:Dynamic ‑> String ‑> JqXHR ‑> Void, ?dataType:String):JqXHR

Load data from the server using a HTTP GET request.

static getJSON (url:String, ?data:Dynamic, ?success:Dynamic ‑> String ‑> JqXHR ‑> Void):JqXHR

Load JSON-encoded data from the server using a GET HTTP request.

static getScript (url:String, ?success:String ‑> String ‑> JqXHR ‑> Void):JqXHR

Load a JavaScript file from the server using a GET HTTP request, then execute it.

static globalEval (code:String):Void

Execute some JavaScript code globally.

static grep (array:EitherType<Array<Dynamic>, NodeList>, _function:Dynamic ‑> Int ‑> Bool, ?invert:Bool):Array<Dynamic>

Finds the elements of an array which satisfy a filter function. The original array is not affected.

static hasData (element:Element):Bool

Determine whether an element has any jQuery data associated with it.

static holdReady (hold:Bool):Void

Holds or releases the execution of jQuery's ready event.

static htmlPrefilter (html:String):String

Modify and filter HTML strings passed through jQuery manipulation methods.

static inArray (value:Dynamic, array:Array<Dynamic>, ?fromIndex:Float):Float

Search for a specified value within an array and return its index (or -1 if not found).

static isArray (obj:Dynamic):Bool

Determine whether the argument is an array.

static isEmptyObject (object:Dynamic):Bool

Check to see if an object is empty (contains no enumerable properties).

static isFunction (obj:Dynamic):Bool

Determine if the argument passed is a JavaScript function object.

static isNumeric (value:Dynamic):Bool

Determines whether its argument represents a JavaScript number.

static isPlainObject (object:Dynamic):Bool

Check to see if an object is a plain object (created using "{}" or "new Object").

static isWindow (obj:Dynamic):Bool

Determine whether the argument is a window.

static isXMLDoc (node:Element):Bool

Check to see if a DOM node is within an XML document (or is an XML document).

static makeArray (obj:Dynamic):Array<Dynamic>

Convert an array-like object into a true JavaScript array.

static map (array:Array<Dynamic>, callback:Dynamic ‑> Int ‑> Dynamic):Array<Dynamic>

static map (object:Dynamic, callback:Dynamic ‑> String ‑> Dynamic):Array<Dynamic>

Translate all items in an array or object to new array of items.

static merge (first:EitherType<Array<Dynamic>, NodeList>, second:EitherType<Array<Dynamic>, NodeList>):Array<Dynamic>

Merge the contents of two arrays together into the first array.

static noConflict (?removeAll:Bool):Dynamic

Relinquish jQuery's control of the $ variable.

static noop ():Void

An empty function.

static now ():Float

Return a number representing the current time.

static param (obj:Dynamic):String

static param (obj:Dynamic, traditional:Bool):String

Create a serialized representation of an array, a plain object, or a jQuery object suitable for use in a URL query string or Ajax request. In case a jQuery object is passed, it should contain input elements with name/value properties.

static parseHTML (data:String, ?context:Element, ?keepScripts:Bool):Array<Element>

Parses a string into an array of DOM nodes.

static parseJSON (json:String):Dynamic

Takes a well-formed JSON string and returns the resulting JavaScript value.

static parseXML (data:String):Document

Parses a string into an XML document.

static post (settings:Dynamic):JqXHR

static post (url:String, ?data:Dynamic, ?success:Dynamic ‑> String ‑> JqXHR ‑> Void, ?dataType:String):JqXHR

Load data from the server using a HTTP POST request.

static proxy (_function:Function, context:Dynamic):Function

static proxy (context:Dynamic, name:String):Function

static proxy (_function:Function, context:Dynamic, ?additionalArguments:Dynamic):Function

static proxy (context:Dynamic, name:String, ?additionalArguments:Dynamic):Function

Takes a function and returns a new one that will always have a particular context.

static queue (element:Element, ?queueName:String):Array<Void ‑> Void>

static queue (element:Element, queueName:String, newQueue:Array<Void ‑> Void>):JQuery

static queue (element:Element, queueName:String, callback:Function):JQuery

Show the queue of functions to be executed on the matched element- OR Manipulate the queue of functions to be executed on the matched element-

static dynamic readyException (error:Error):String

Handles errors thrown synchronously in functions wrapped in jQuery().

static removeData (element:Element, ?name:String):JQuery

Remove a previously-stored piece of data-

static speed (settings:Dynamic):Dynamic

static speed (?duration:EitherType<Float, String>, ?settings:Dynamic):Dynamic

static speed (?duration:EitherType<Float, String>, ?easing:String, ?complete:Function):Dynamic

Creates an object containing a set of properties ready to be used in the definition of custom animations.

static sub ():JQuery

Creates a new copy of jQuery whose properties and methods can be modified without affecting the original jQuery object-

static trim (str:String):String

Remove the whitespace from the beginning and end of a string.

static type (obj:Dynamic):String

Determine the internal JavaScript [[Class]] of an object.

static unique (array:Array<Element>):Array<Element>

Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.

static uniqueSort (array:Array<Element>):Array<Element>

Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.

static when (deferreds:Rest<Deferred>):Promise

Provides a way to execute callback functions based on zero or more objects, usually Deferred objects that represent asynchronous events.

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/jquery/JQuery.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部