JQuery Flashcards

1
Q

what is the result?

(true + false) > 2 + true

A
false because 
true = 1
false = 0 
(1+0) = 1
1 is not greater than 2 so
(true + false) > 2 is false
when we have false and true together we get false.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

why would we use jQuery and what is it?

A

Write Less, Do More, and it is a Javascript Library.

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

what are the cons of JQuery?

A

Hard to use with OOP. they support plugins that have not been verified. and they are a library

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

what is the syntax to ensure JQuery is running

A

$(document).ready(function());

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

how to create a div tag with JQuery

A

$(“<div></div>”);

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

how to select a tag in JQuery?

A

$(“div”);

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

how to select an id in JQuery?

A

$(“#idName”);

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

how to select a class in JQuery?

A

$(“.className”);

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

perform a hide action on all p tags using JQuery

A

$(“p”).hide();

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

how to remove class from a paragraph

A

$(“p”).removeClass(“cat”);

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

how to add text to a paragraph?

A

$(“p”).text(“heeelllooo”);

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

how to wrap an element

A

$(“p”).wrap(“<a></a>”);

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