$MD[ - The Cheat Sheet

jQuery CheatSheet

Selectors

$("*") $("p.demo") $("p:first") $("p span") $("p > span") $("p + span") $("p ~ span") $("ul li:first") $("ul li:first-child") $("ul li:nth-child(3)") $("[href]") $("a[target='_blank']") $("a[target!='_blank']") $(":input") $(":button") $("tr:even") $("tr:odd") $("span:parent") $("span:contains('demo')")

// all elements // elements with cla // the first element // span, descendant of p // span, direct child of // span immediately proc // strong element procee // the first elemen // the first elemen // third child // any element with an h // elements with a t // elements with a t // all form elements // and // even elements // odd elements // element which has chi // element conaining the

Actions

$(selector).action() $(this).hide() $("div").hide() $(".demo").hide() $("#demo").hide()

// the current element // all elements // all elements with class="demo // the element with id="demo"

Events

$(".demo").click(function(){ $(this).hide(200);

});

Mouse

scroll, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, load, resize, scroll, unload, error

Keyboard keydown, keypress, keyup

Form submit, change, focus, blur

DOM Element blur, focus, focusin, focusout, change, select, submit

Browser load, resize, scroll, unload, error

.bind()

$(document).ready(function() { $("#demo").bind('blur', function(e) { //dom event fired });

});

// attac

Effects

Basics

Include Download ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download