Beginner’s essential

jQuery Cheat Sheet

Write less, and do more! An essential tool for rapid web development.

#################

TABLE OF CONTENTS Selectors

3

Attributes / CSS

5

Manipulation

6

Traversing

7

Events

8

Effects

10

AJAX

11

Core

12

2 of 13

SELECTORS Basics

:target

* .class element #id selector1, selectorN, …

Content Filters :contains() :empty :has() :parent

Heirarchy parent > child ancestor descendant prev + next prev ~ siblings

Basic Filters :animated :eq() :even :first :gt() :header :lang() :last

Visibility Filters :hidden :visible

Attribute [name|="value"] [name*="value"] [name~="value"] [name$="value"] [name="value"] [name!="value"] [name^="value"] [name] [name="value"][name2="value2"]

:lt()

Child Filters

:not()

:first-child

:odd

:first-of-type

:root 3 of 13

:last-child

Forms

:last-of-type

:button

:nth-child()

:checkbox

:nth-last-child()

:checked

:nth-last-of-type()

:disabled

:nth-of-type()

:enabled

:only-child

:focus

:only-of-type()

:file

length

:image

%

:input

border-box | padding-box | content-box | no-clip

:password :radio :reset :selected :submit :text

4 of 13

ATTRIBUTES / CSS

.offset() .offsetParent()

Attributes .attr() .prop()

.position() .scrollLeft() .scrollTop()

.removeAttr() .removeProp()

Data

.val()

jQuery.data() .data()

CSS .addClass() .css()

jQuery.hasData() jQuery.removeData() .removeData()


jQuery.cssHooks jQuery.cssNumber jQuery.escapeSelector() .hasClass() .removeClass() .toggleClass()

Dimensions .height() .innerHeight() .innerWidth() .outerHeight() .outerWidth() .width()

Offset 5 of 13

MANIPULATION

.unwrap()

Copying

DOM Replacement

.clone()

.replaceAll() .replaceWith()


DOM Insertion, Around .wrap() .wrapAll() .wrapInner()

DOM Insertion, Inside .append() .appendTo() .html() .prepend() .prependTo() .text()

DOM Insertion, Outside .after() .before() .insertAfter() .insertBefore()

DOM Removal .detach() .empty() .remove() 6 of 13

TRAVERSING

.nextUntil() .parent()

Filtering .eq() .filter() .first() .has() .is()

.parents() .parentsUntil() .prev() .prevAll() .prevUntil() .siblings()


.last() .map() .not() .slice()

Miscellaneous Traversing .add() .addBack() .andSelf() .contents() .each() .end()

Tree Traversal .children() .closest() .find() .next() .nextAll() 7 of 13

EVENTS

.focus() .focusin()

Browser Events .error() .resize()

.focusout() .select() .submit()

.scroll()

Keyboard Events Document Loading .load() .ready()

.keydown() .keypress() .keyup()

.unload()

Mouse Events Event Handler Attachment .bind() .delegate() .die() .live() .off() .on() .one() .trigger() .triggerHandler() .unbind() .undelegate()

Form Events .blur() .change()

.click() .contextMenu() .dblclick() .hover() .mousedown() .mouseenter() .mouseleave() .mousemove() .mouseout() .mouseover() .mouseup() .toggle()

Event Object event.currentTarget event.delegateTarget

8 of 13

event.data event.isDefaultPrevented() event.isImmediatePropagationStop ped() 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


9 of 13

EFFECTS

Sliding

Basics

.slideToggle()

.hide()

.slideDown()

.slideUp()


.show() .toggle()

Custom .animate() .clearQueue() .delay() .dequeue() jQuery.dequeue() .finish() jQuery.fx.interval jQuery.fx.off jQuery.speed .queue() jQuery.queue() .stop()

Fading .fadeIn() .fadeOut() .fadeTo() .fadeToggle()

10 of 13

AJAX Global Ajax Event Handlers .ajaxComplete() .ajaxError() .ajaxSend() .ajaxStart() .ajaxStop() .ajaxSuccess()

Helper Functions jQuery.param() .serialize() .serializeArray()

Low-Level Interface jQuery.ajax() jQuery.prefilter() jQuery.ajaxSetup() jQuery.ajaxTransport()

Shorthand Methods jQuery.get() jQuery.getJSON() jQuery.getScript() jQuery.post() .load()


11 of 13

CORE

.promise()

jQuery Object

Utilities

jQuery()

jQuery.boxModel

jQuery.noConflict()

jQuery.browser

jQuery.sub()

jQuery.contains()

jQuery.holdReady()

jQuery.each()

jQuery.when()

jQuery.extend() jQuery.globalEval()

Deferred Object jQuery.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()

jQuery.grep() jQuery.inArray() jQuery.isArray() jQuery.isEmptyObject() jQuery.isFunction() jQuery.isNumeric() jQuery.isPlainObject() jQuery.isWindow() jQuery.isXMLDoc() jQuery.makeArray() jQuery.map() jQuery.merge() jQuery.noop() jQuery.now() jQuery.parseHTML() jQuery.parseJSON() jQuery.parseXML() jQuery.proxy()

12 of 13

jQuery.support

callbacks.fireWith()

jQuery.trim()

callbacks.has()

jQuery.type()

callbacks.lock()

jQuery.unique()

callbacks.locked()

jQuery.uniqueSort()

callbacks.remove()

DOM Element Methods .get() .index() .size() .toArray()

Internals .jquery .context jQuery.error() .length .pushStack() .selector

Callbacks Object jQuery.Callbacks() callbacks.add() callbacks.disable() callbacks.disabled() callbacks.empty() callbacks.fire() callbacks.fired()

13 of 13

jQuery Cheat Sheet

6. Traversing. 7. Events. 8. Effects. 10. AJAX. 11. Core. 12 of 2 13 ... DOM Insertion, Inside .append() .appendTo() .html() .prepend() .prependTo() .text().

92KB Sizes 5 Downloads 410 Views

Recommend Documents

jQuery-Visual-Cheat-Sheet-1.4.2.pdf
a. :text Selector. Selects all elements of type text. a. ❉ CORE / 1. THE jQUERY FUNCTION. jQuery(). Accepts a string containing a CSS selector.

git cheat sheet - Cheat-Sheets.org
git clone ssh://[email protected]/repo.git. Create a new local repository. $ git init. LOCAL CHANGES. Changed files in y our working directory. $ git status.

CSS3 Cheat Sheet - GitHub
Border Radius vendor prefix required for iOS

HTML5 Canvas Cheat Sheet [.pdf] - Cheat-Sheets.org
HTML5 Canvas Cheat Sheet v1.1. Page 2. Colors, styles and shadows. Attributes. Name. Type. Default. strokeStyle any black. fillStyle any black. shadowOffsetX.

gitchangelog Cheat Sheet - GitHub
new: test: added a bunch of test around user usability of feature X. fix: typo in spelling my name in comment. !minor. By Delqvs cheatography.com/delqvs/. Published 14th August, 2017. Last updated 14th August, 2017. Page 1 of 1. Sponsored by ApolloPa

Cheat sheet Services
Create a Version of your current container, and test it out on your live site by using Preview or Debug mode. Navigate around your site and see if the rules and tags are acting the way you expect. Migrate by removing hard-coded tags: You're almost re

Meterpreter Cheat Sheet - SCADAhacker
Page 1 ... Displays network interfaces information meterpreter> route. View and modify networking routing table meterpreter> portfwd. Establish port forwarding.

Reschedule Cheat Sheet
desire to meet with. • You've realized that your account has a meeting scheduled more than once with the same company. • You have reached your outstanding ...

TOP 150 CHEAT SHEET
2 Ezekiel Elliott. DAL. 8. RB. 52 Lamar Miller. HOU. 10. RB ... 62 Dion Lewis. TEN. 8. RB PPR. 112 Kenny Stills .... Ezekiel Elliott. DAL. 3. 7. A.J. Green. CIN. 4. 11.

Machine Learning Cheat Sheet - GitHub
get lost in the middle way of the derivation process. This cheat sheet ... 3. 2.2. A brief review of probability theory . . . . 3. 2.2.1. Basic concepts . . . . . . . . . . . . . . 3 ...... pdf of standard normal π ... call it classifier) or a decis

Cheat Sheet Subnetting.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Cheat Sheet Subnetting.pdf. Cheat Sheet Subnetting.pdf. Open. Extract. Open with. Sign In. Details. Comments

vi / vim graphical cheat sheet
F "back" fwd. G eof/ goto ln Hscreen top. J join lines. K help. L screen bottom ... version at http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html.

CSS3 Cheat Sheet - Smashing Magazine
display none | inline | block | inline- block | list-item | run-in | compact | table | inline- table | table-row-group | table-header-group | table- footer-group | table-row |.Missing:

R Markdown : : CHEAT SHEET - GitHub
Word, or RTF documents; html or pdf based slides ... stop render when errors occur (FALSE) (default = FALSE) .... colortheme. Beamer color theme to use. X css.

Google+ Cheat Sheet - G Suite
3 Find or follow people. 4 Follow or create collections, which group posts around a topic. Learning Center gsuite.google.com/learning-center.

Overtone Cheat Sheet 0.9.1 - WordPress.com
graphviz. Show PDF show-graphviz-synth ... Generate Buffer Data data->wavetable create-buffer-data ... LINEAR LIN EXPONENTIAL EXP. Onset Analysis.

RTOS Threading Cheat Sheet - GitHub
If the UART is enabled, it causes a data frame to start transmitting with the parameters indicated in the. UARTLCRH register. Data continues to be transmitted ...

Pokemon Go Cheat Sheet 619 ^% Pokemon Go Cheat Codes Ios
Free Pokemon Go hacks and cheats online for Android and iOS devices, which ... 6 Code Generator Pokemon Go Cheats For Ios 10 Live Free Game Generator.

jQuery 17 Visual Cheat Sheet_v6 - GitHub
Get the HTML contents of the first element in the set of matched elements. ..... Bind two or more handlers to the matched elements, to be executed on alternate ...

[Cheat Sheet] 15 Credit & Balance Sheet Ratios.pdf
Page 1 of 1. Cheat Sheet: Balance Sheet Ratios. Ratios to evaluate credit health and management's operating capital efficiency. Interest Coverage Ratios Calculation Healthy. Ratios that specifically measure a business's ability to make interest payme

Groups Cheat Sheet - G Suite
1 Access your groups, or create new ones. Switch from public groups to ... Change your Groups settings Edit membership settings, email subscriptions, update ...

Sheets Cheat Sheet - G Suite
Publish to the web—Publish a copy of your spreadsheet as a webpage or embed your spreadsheet in a website. Email as attachment—Email a copy of your ...

Keep Cheat Sheet - G Suite
Create and share notes, lists, and reminders. 1 Create notes, lists, and reminders. 2 Organize notes with colors and labels. Learning Center.

ASTRA-cheat-sheet-b&w.pdf
Retrying... ASTRA-cheat-sheet-b&w.pdf. ASTRA-cheat-sheet-b&w.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying ASTRA-cheat-sheet-b&w.pdf.