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
*
Content Filters
.class
:contains()
element
:empty
#id
:has()
selector1, selectorN, …
:parent
Heirarchy
Visibility Filters
parent > child
:hidden
ancestor descendant
:visible
prev + next
prev ~ siblings Attribute
[name|="value"]
Basic Filters
[name*="value"]
:animated
[name~="value"]
:eq()
[name$="value"]
:even
[name="value"]
:first
[name!="value"]
:gt()
[name^="value"]
:header
[name]
:lang()
[name="value"][name2="value2"]
:last
: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 | :password
content-box | no-clip
:radio
:reset
:selected
:submit
:text
4 of 13
ATTRIBUTES / CSS .offset()
.offsetParent()
Attributes .position()
.attr()
.scrollLeft()
.prop()
.scrollTop()
.removeAttr()
.removeProp() Data
.val() [Link]()
.data()
CSS [Link]()
.addClass()
[Link]()
.css()
.removeData()
[Link]
[Link]
[Link]()
.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 .parents()
.eq()
.parentsUntil()
.filter()
.prev()
.first()
.prevAll()
.has()
.prevUntil()
.is()
.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 .focusout()
.error()
.select()
.resize()
.submit()
.scroll()
Keyboard Events
Document Loading .keydown()
.load()
.keypress()
.ready()
.keyup()
.unload()
Mouse Events
Event Handler Attachment .click()
.bind()
.contextMenu()
.delegate()
.dblclick()
.die()
.hover()
.live()
.mousedown()
.off()
.mouseenter()
.on()
.mouseleave()
.one()
.mousemove()
.trigger()
.mouseout()
.triggerHandler()
.mouseover()
.unbind()
.mouseup()
.undelegate()
.toggle()
Form Events
Event Object
.blur()
[Link]
.change()
[Link]
8 of 13
[Link]
[Link]()
[Link]
ped()
[Link]()
[Link]
[Link]
[Link]
[Link]
[Link]()
[Link]
[Link]
[Link]()
[Link]()
[Link]
[Link]
[Link]
[Link]
9 of 13
Sliding
EFFECTS
.slideDown()
Basics .slideToggle()
.hide()
.slideUp()
.show()
.toggle()
Custom
.animate()
.clearQueue()
.delay()
.dequeue()
[Link]()
.finish()
[Link]
[Link]
[Link]
.queue()
[Link]()
.stop()
Fading
.fadeIn()
.fadeOut()
.fadeTo()
.fadeToggle()
10 of 13
AJAX
Global Ajax Event Handlers
.ajaxComplete()
.ajaxError()
.ajaxSend()
.ajaxStart()
.ajaxStop()
.ajaxSuccess()
Helper Functions
[Link]()
.serialize()
.serializeArray()
Low-Level Interface
[Link]()
[Link]()
[Link]()
[Link]()
Shorthand Methods
[Link]()
[Link]()
[Link]()
[Link]()
.load()
11 of 13
CORE .promise()
jQuery Object Utilities
jQuery() [Link]
[Link]() [Link]
[Link]() [Link]()
[Link]() [Link]()
[Link]() [Link]()
[Link]()
Deferred Object [Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
12 of 13
[Link] [Link]()
[Link]() [Link]()
[Link]() [Link]()
[Link]() [Link]()
[Link]() [Link]()
DOM Element Methods
.get()
.index()
.size()
.toArray()
Internals
.jquery
.context
[Link]()
.length
.pushStack()
.selector
Callbacks Object
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
[Link]()
13 of 13