├── bubble.html ├── comment.html ├── delegate.html ├── event-common.html ├── event.html ├── js └── events.js ├── more-events.html └── summary.html /bubble.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Event Bubble 9 | 10 | 11 | 12 |

Event Bubble vai

13 |
14 |

Bubble vai list

15 | 23 |
24 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /comment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Comment 9 | 10 | 11 | 12 |

Add your comment, Please!!

13 |
14 |

Your comments

15 |
16 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos veniam aspernatur totam id adipisci, 17 | voluptate a. Architecto nesciunt aliquid, laudantium iste nihil saepe at deleniti, porro culpa neque 18 | distinctio ad?

19 |

Vero sint exercitationem ad quasi explicabo esse quae dignissimos aperiam, mollitia rerum eligendi 20 | dolorem porro vel perferendis! Quidem, autem quasi! Deleniti totam odit officia esse suscipit nam fugit 21 | ipsum numquam!

22 | 23 |
24 |
25 | 26 |
27 | 28 |
29 |
30 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /delegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Event Delegate 9 | 10 | 11 | 12 |

Event Delegate

13 | 21 | 22 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /event-common.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 |

14 | 15 | 16 | 17 | 18 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /event.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Events 9 | 10 | 11 | 12 |

Event niye Clickbaji

13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /js/events.js: -------------------------------------------------------------------------------- 1 | function makeRed() { 2 | document.body.style.backgroundColor = 'red'; 3 | } 4 | 5 | // handle blue button click by setting function name 6 | 7 | const blueButton = document.getElementById('make-blue-button'); 8 | // just set the name of the function 9 | blueButton.onclick = makeBlue; 10 | 11 | function makeBlue() { 12 | document.body.style.backgroundColor = 'blue'; 13 | } 14 | 15 | // handle event using anonymous function 16 | const greenButton = document.getElementById('make-green-button'); 17 | // anonymous function 18 | greenButton.onclick = function () { 19 | document.body.style.backgroundColor = 'green'; 20 | } 21 | 22 | // handle by using add eventlisenter 23 | const goldenButton = document.getElementById('make-goldenrod'); 24 | goldenButton.addEventListener('click', makeGoldenRod); 25 | 26 | function makeGoldenRod() { 27 | document.body.style.backgroundColor = 'goldenrod'; 28 | } 29 | 30 | // addEventListener 31 | const hotPinkButton = document.getElementById('make-hotpink'); 32 | hotPinkButton.addEventListener('click', function () { 33 | document.body.style.backgroundColor = 'hotpink'; 34 | }) 35 | 36 | // direct shortcut 37 | document.getElementById('light-blue').addEventListener('click', function () { 38 | document.body.style.backgroundColor = 'lightblue'; 39 | }) -------------------------------------------------------------------------------- /more-events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 |

More Events

13 |
14 |

Very very important secret information

15 | 16 | 17 |
18 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Event summary 9 | 10 | 11 | 12 |

More Mouse event

13 | 14 | 15 | 34 | 35 | 36 | --------------------------------------------------------------------------------