jQuery Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

in jquery how can you bind events to a click event

A

.click()

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

in jquery, the click event handler will only be called when what 2 requirements are met

A
  • The mouse button is depressed while the pointer is inside the element.
  • The mouse button is released while the pointer is inside the element.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

in jquery how can you get/set css properties

A

.css()

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

in jquery how can you remove a class

A

.removeClass()

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

in jquery how can you select siblings (excluding the selection of the node it is called on

A

.siblings()

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

in jquery how can you add a class

A

.addClass()

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

in jquery, how can you swap whether an element is shown or hidden

A

.toggle()

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

in jquery what is the short hand for grabbing an element by tag name

A

$(“tag”)[index]; i.e. $(“canvas”)[0] grabs first canvas tag

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

in jquery, issue a ajax get request, check if it succesfully handled and failed using a callback

A

$.ajax(“google.com”)
.done(function(data){console.log(data);})
.fail(function(xhr){console.log(“error occured”, xhr.responeText)};

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