File tree Expand file tree Collapse file tree 3 files changed +76
-0
lines changed Expand file tree Collapse file tree 3 files changed +76
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+
4
+ < head >
5
+ < meta charset ="utf-8 ">
6
+ < meta name ="viewport " content ="width=device-width ">
7
+ < title > Chapter 8 - Practise Set</ title >
8
+ < link href ="style.css " rel ="stylesheet " type ="text/css " />
9
+ </ head >
10
+
11
+ < body >
12
+ <!-- Q1 -->
13
+ <!-- <button onclick="alert('Please give me a Burger')">Burger</button>
14
+ <button onclick="alert('Please give me a Plate Momos')">Momo</button>
15
+ <button onclick="alert('Please give me a Plate Chowmein')">Chowmein</button> -->
16
+
17
+ <!-- Q2 -->
18
+ <!-- <h1>Bookmarks</h1>
19
+ <button id="google">Google</button>
20
+ <button id="fb">Facebook</button>
21
+ <button id="insta">Instagram</button> -->
22
+
23
+ < div id ="bulb " class ="bulbcontainer bulb "> </ div >
24
+ < script src ="script.js "> </ script >
25
+
26
+
27
+ </ body >
28
+
29
+ </ html >
Original file line number Diff line number Diff line change
1
+ // Q2 - Q3
2
+ /*
3
+ document.getElementById("google").addEventListener("click", function() {
4
+ window.location = "https://google.com"
5
+ window.focus()
6
+ })
7
+ document.getElementById("fb").addEventListener("click", function() {
8
+ window.location = "https://facebook.com"
9
+ window.focus()
10
+ })
11
+ document.getElementById("insta").addEventListener("click", function() {
12
+ window.location = "https://instagram.com"
13
+ window.focus()
14
+ })
15
+ */
16
+
17
+ //Q4
18
+ /*
19
+ const fetchContent = async (url) => {
20
+ con = await fetch(url);
21
+ let a = await con.json()
22
+ return a;
23
+ }
24
+
25
+ setInterval(async function() {
26
+ let url = "https://jsonplaceholder.typicode.com/todos/1"
27
+ console.log(await fetchContent(url))
28
+ }, 3000)
29
+ */
30
+
31
+
32
+ setInterval ( async function ( ) {
33
+ document . querySelector ( "#bulb" ) . classList . toggle ( "bulb" )
34
+ } , 250 )
Original file line number Diff line number Diff line change
1
+ html , body {
2
+ height : 100% ;
3
+ width : 100% ;
4
+ }
5
+
6
+ .bulb {
7
+ background : yellow;
8
+ }
9
+
10
+ .bulbcontainer {
11
+ height : 341px ;
12
+ width : 341px ;
13
+ }
You can’t perform that action at this time.
0 commit comments