jQuery Flashcards

1
Q

all jQuery functions start with …

A

$

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

add classes to elements

A

.addClass() function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

select CSS class

A

.class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

select CSS id

A

id

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

select type

A

html element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

remove class from elements

A

.removeClass() function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

change the CSS of an element with…

A

.css()

.css(“color”,”blue”);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

adjust the properties of elements (non-CSS)

A

.prop()

.prop(‘disabled’, true)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

add HTML tags and text within an element

A

.html()

$(“h3”).html(“<em>jQuery Playground</em>”);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

.text() and what it does

A

only alters text without adding tags, otherwise similar to .HTML()

will not evaluate any HTML tags passed to it, but will instead treat it as the text you want to replace the existing content with.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

remove an HTML element entirely

A

.remove()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

select HTML elements and append them to another element

A

.appendTo(“#id”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

make a copy of the element

A

.clone()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

access the parent of whichever element

A

.parent()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

access the children of whatever element

A

.children()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

CSS selector allows you to select all the nth elements with the target class or element type

A

target:nth-child(n)

17
Q

give the third element in each well the bounce class

A

$(“.target:nth-child(3)”).addClass(“animated bounce”);

18
Q

target odd and even elements

A

target:odd (:even)

index is 0-based, so odd selects 1,3,5 etc.