8. jQuery Flashcards

1
Q

What is jQuery?

A

A fast, small, and feature-rich JavaScript library designed to simplify the scripting of HTML

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

What is jQuery structure?

A

$(selector).action();

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

What is $?

A

A shorthand for jQuery.

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

Reading HTML

A

$(“#myDiv”).html();

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

Writing /updating HTML content of the selected element

A

$(“#myDiv”).html(“<p>New HTML Content</p>”);

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

What is .html() method used for?

A

Used to get or set the HTML content of an element

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

What is .val() method used for?

A

Used to get or set the value of form elements, such as input, textarea, or select elements

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

What is .append() method used for?

A

Used to insert content at the end of the selected element(s). It allows you to dynamically add new HTML elements without replacing existing content

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

What is an event?

A

An event is a condition that your code is waiting for

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

How to program a clickable button?

A

$(“#btn_1”).click(function(){
console.log(“button click!”);
});

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

Click method syntax

A

$().click();

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

What is anonymous function?

A

Function with no name?

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