JS & JQuery Flashcards

1
Q

Adds HTML elements to the end of the selected element

A

$( ).appendTo()

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

Adds HTML elements to the beginning of the selected element

A

$( ).prependTo()

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

Removes the selected HTML element from the web page

A

$( ).remove()

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

Hides the selected HTML element

A

$( ).hide()

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

Displays the element

A

$( ).show()

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

Alternates hiding and showing the element

A

$( ).toggle()

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

Adds a CSS class to an element

A

$( ).addClass()

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

Removes a CSS class from an element

A

$( ).removeClass()

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

Alternates adding and removing class from an element

A

$( ).toggleClass()

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

Method that gets next sibling of selected element

A

.next()

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

Method that gets the previous sibling of the selected element

A

.prev()

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

Method that gets all the children of the selected element

A

.children()

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

How to load a function once the html document is ready

A

$(document).ready(main);

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

How to grab form inputs (like grabbing text from a <p> elem)</p>

A

.val()

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

Method shows selected HTML element by sliding it down / up

A

.slideDown() / .slideUp()

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

Animation method

A

.animate()

17
Q

.animate() parameters

A
  1. A set of CSS properties

2. Time duration