File tree Expand file tree Collapse file tree 6 files changed +2003
-0
lines changed Expand file tree Collapse file tree 6 files changed +2003
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en " dir ="ltr ">
3+
4+ < head >
5+ < meta charset ="utf-8 ">
6+ < title > </ title >
7+ </ head >
8+
9+ < body >
10+ < p class ="date "> </ p >
11+ < p class ="details "> </ p >
12+ < button > Click me!</ button >
13+ < script src ="index.js "> </ script >
14+ </ body >
15+
16+ </ html >
Original file line number Diff line number Diff line change 1+ const myEvent = new Event ( 'details' )
2+
3+ document . querySelector ( 'button' ) . addEventListener ( 'click' , ( e ) => {
4+ document . querySelector ( '.date' ) . innerHTML = `Hello! It is currently ${ new Date ( ) } .`
5+ myEvent . details = e
6+ document . dispatchEvent ( myEvent )
7+ } )
8+
9+ document . addEventListener ( 'details' , ( e ) => {
10+ document . querySelector ( '.details' ) . innerHTML = `x: ${ e . details . x } y: ${ e . details . y } `
11+ } )
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en " dir ="ltr ">
3+
4+ < head >
5+ < meta charset ="utf-8 ">
6+ < title > </ title >
7+ < link rel ="stylesheet " type ="text/css " href ="style.css " />
8+ </ head >
9+
10+ < body >
11+ < input class ="box-color-input jscolor " type ="text " placeholder ="Sticky Color ">
12+ < input class ="box-color-note " type ="text " placeholder ="Sticky Note Message ">
13+ < button class ="box-creator-button "> Create a Sticky!</ button >
14+
15+ < div class ="container "> </ div >
16+
17+ < div id ="messageBox ">
18+ < p > This sticky's color is < span id ="color "> </ span > and its message is < span id ="message "> </ span > .
19+ < p > < button id ="delete "> Delete this sticky</ button > < button id ="close "> Close</ button > </ p >
20+ </ div >
21+
22+ < script src ="jscolor.js "> </ script >
23+ < script src ="script.js "> </ script >
24+ </ body >
25+
26+ </ html >
You can’t perform that action at this time.
0 commit comments