Cheatography
https://cheatography.com
Selectors
$('*'); |
$('element'); |
$('.class'); |
$('#ID'); |
$('selector1, selector2, selectorN'); |
DOM
.append() |
.prepend() |
.appendTo() |
.prependTo() |
.after() |
.before() |
.insertAfter() |
.insertBefore() |
.next() |
.prev() |
.data() |
.attr('attributeName','atribute') |
.removeProp() |
prop() |
.empty() |
.remove() |
.removeAttr() |
.first() |
.last() |
.children() |
.find() |
.html() |
.text(); |
.val() |
.end() |
.css('styleName','style') |
.addClass() |
.removeClass() |
toggleClass() |
.eq() |
.end() |
not() |
var object = $.extend({}, object1, object2); |
Animations and Effects
.slideUp() |
.slideDown() |
.width('0px') |
.height('0px') |
.fadeOut(ms) |
.fadeIn(ms) |
.hide(ms) |
.show(ms) |
.fadeToggle() |
.slideToggle() |
.toggle('fast,slow',ms) |
.finish() |
.stop() |
.queue() |
clearQueue() |
.dequeue() |
.animate({'regla:css'},ms,function(){}); |
|
|
Event List
|
Browser Events |
.resize() |
.scroll() |
|
Document Loading |
.holdReady() |
ready() |
|
Event Handler Attachment |
.on() |
.bind() |
|
form events |
.blur() |
.change() |
.focus() |
.select() |
.submit() |
|
Keyboard Events |
.keydown() |
.keypress() |
.keyup() |
|
Mouse Events |
.click() |
.dblclick() |
focusin() |
focusout() |
.hover(handlerIn,HandlerOut) |
.hover(handlerInOut) |
.mousedown() |
.mouseenter() |
.mouseleave() |
.mousemove() |
.mouseout() |
.mouseover() |
.mouseup() |
basic syntax
$('selector')
.methodOne()
.methodTwo()
.methodN(); |
|
|
Event Object
e.currentTarget |
e.data |
e.isDefaultPrevented() |
e.namespace |
e.isImmediatePropagationStopped() |
e.isPropagationStopped() |
e.pageX |
e.pageY |
e.preventDefault() |
e.relatedTarget |
e.result |
e.stopImmediatePropagation() |
e.stopPropagation() |
e.target |
e.timeStamp |
e.type |
e.which |
Event Handler
$('selector').event(functionName); |
$('selector').event(function(){}); |
$('selector').on('event',functionName); |
$('selector')on('event',functionName(){}); |
$bind('event',function); |
$(this) |
AJAX
.ajaxComplete() |
ajax.Error() |
.ajaxSend() |
.ajaxStart() |
.ajaxStop() |
.ajaxSuccess() |
Helper Functions |
JQuery.param() |
.serialize() |
serializeArray() |
Low-Level Interface |
JQuery.ajax() |
JQuery.ajax.Setup() |
ShortHand Methods |
JQuery.get() |
JQuery.getJSON() |
JQuery.getScript() |
JQuery.getScript().load() |
JQuery.post() |
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets