Web Development with jQuery®

(Elliott) #1

Appendix C (^) ❘ 505
bapp03.indd 02/17/2015 Page 505
has(selector) Reduces a previous selection based on
whether the selection matches the selector
provided in the selector argument.
jQuery
has(element) Reduces a selection based on whether the
selection matches the DOM element pro-
vided in the element argument.
jQuery
is(selector) Returns true if one or more elements match
the condition specifi ed in the selector. For
example:
$('input').is(':checked')
Boolean
is(function(index)) Returns true if the callback function returns
true for one or more elements. Returns
false if the callback function returns false
for every item passed to the callback function.
As with most jQuery callback functions,
this refers to the current element within
the callback function, and the callback func-
tion is provided the argument list:
offset, element.
Boolean
is(selection) Returns true if the selection matches one or
more items present using an existing jQuery
selection.
Boolean
is(elements) Returns true if the selection matches any
of the DOM element object reference(s)
provided.
Boolean
last() Removes all elements from the selection,
except the last.
jQuery
continues
http://www.it-ebooks.info

Free download pdf