-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjQuery
21 lines (20 loc) · 1.16 KB
/
jQuery
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Selectors:
$("*") Selects all elements
$(this) Selects the current HTML element
$("p.intro") Selects all <p> elements with class="intro"
$("p:first") Selects the first <p> element
$("ul li:first") Selects the first <li> element of the first <ul>
$("ul li:first-child") Selects the first <li> element of every <ul>
$("[href]") Selects all elements with an href attribute
$("a[target='_blank']") Selects all <a> elements with a target attribute value equal to "_blank"
$("a[target!='_blank']") Selects all <a> elements with a target attribute value NOT equal to "_blank"
$(":button") Selects all <button> elements and <input> elements of type="button"
$("tr:even") Selects all even <tr> elements
$("tr:odd") Selects all odd <tr> elements
Events:
Mouse Events Keyboard Events Form Events Document/Window Events
========================================================================
click keypress submit load
dblclick keydown change resize
mouseenter keyup focus scroll
mouseleave blur unload