Web Programming - Week 4 Flashcards

1
Q

What is the window object

A

The global object of JavaScript in the browser

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

What are the three kinds of popup boxes in JavaScript

A

window. alert - Displays alert with content and OK button
window. prompt - For text input
window. confirm - To verify or accept something

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

What is the purpose of jQuery

A

To make it much easier to use JavaScript on the website

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

Advantages of jQuery code

A

Allows less code to be written

Allows reusability with different JavaScript code

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

Write document.getElementsById(“myheader”) in jQuery notation

A

$(“myHeader”)

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

Write document.getElementsByClassName(“divClass”)

A

$(“.divClass”)

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

Write code that accesses all < p > elements with id “intro”

A

$(“p.intro”)

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

How to access the jQuery library

A

< script src=”jquery-3.5.1.min.js >< /script > in the head tag

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

JQuery Syntax

A

$(selector).action()

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

What is the method to run code when a website is finished loading

A

The (document).ready() method

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

What is the p.toggle method

A

Toggle(ms) shows or hides a paragraph

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

The jQuery CSS method

A

$(“div”).css ({property : value, property : value, etc…});

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

jQuery filtering methods

A

first()
last()
eq() - returns element with a specific index

filter()
not()

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

JQuery class methods

A

addClass()
removeClass()
toggleClass()

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

Most common jQuery Mouse events

A

click()
dblclick()
mouseenter()
mouseleave()

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

Most common jQuery Keyboard events

A

keypress()
keydown()
keyup()

17
Q

Most common jQuery Form events

A

submit()
change()
focus()
blur()

18
Q

Most common jQuery Document/Window events

A

load()
resize()
scroll()
unload()