├── 01.Javascript-Basics ├── 01.Where-to-add-javascript │ └── index.html ├── 02.Async & defer │ ├── index.html │ └── script1.js ├── 03.Working with strings │ └── index.html ├── 04.Storing data with variables │ └── index.html ├── 05.Mixing-strings-with-variables │ └── index.html ├── 06.Data types: Numbers │ └── index.html ├── 07.Data types: Boolean, null & undefined │ └── index.html ├── 08.Comments, semicolons and ASI │ └── index.html ├── 09.Operators: Assignment and comparison │ └── index.html ├── 10.Operators: Logical and arithmetic │ └── index.html ├── 11.Introduction-to-arrays │ └── index.html ├── 12.Introduction-to-objects │ └── index.html └── 13.Introduction-to-functions │ └── index.html ├── 02.Arrays-In-More-Depth ├── 01.The-array-constructor │ └── index.html ├── 02.Properties-methods-prototype │ └── index.html ├── 03.Modifying-arrays │ └── index.html ├── 04.Returning-new-values │ └── index.html ├── 05.Iteration Methods │ └── index.html ├── 06.Reducers │ └── index.html ├── 07.Map-forEach │ └── index.html ├── 08-Array-destructuring │ └── index.html ├── 09.Unique-values-with-set │ └── index.html └── 10.Two-dimensional-arrays │ └── index.html ├── 03.Functions ├── 01.The-global-object-built-in-functions │ └── index.html ├── 02.Function-expressions │ └── index.html ├── 03.Immediately-invoked-function-expressions │ └── index.html ├── 04.Anonymous-or-named │ └── index.html ├── 05.A-function-or-a-method │ └── index.html ├── 06.Arrow-functions │ └── index.html └── 07.Default-parameter-values-and-using-rest │ └── index.html ├── 04.Events-And-The-DOM ├── 01.Selecting-elements │ └── index.html ├── 02.Changing-values-and-attributes │ ├── burger.jpg │ └── index.html ├── 03.Changing-an-elements-css │ ├── burger.jpg │ └── index.html ├── 04.Creating-new-elements │ ├── burger.jpg │ └── index.html ├── 05.Adding-elements-to-the-page │ ├── burger.jpg │ └── index.html ├── 06.Cloning-and-removing-elements │ ├── burger.jpg │ └── index.html ├── 07.Mini-challenge-create-a-new-section │ ├── burger.jpg │ ├── index.html │ └── styles.css ├── 08.Looping-with-dom-elements │ ├── burger.jpg │ ├── index.html │ └── styles.css ├── 09.Listening-for-events │ ├── burger.jpg │ ├── burger2.jpg │ ├── index.html │ └── styles.css ├── 10.Listening-for-multiple-events-and-event-data │ ├── burger.jpg │ ├── burger2.jpg │ ├── elements.js │ ├── events.js │ ├── index.html │ └── styles.css ├── 11.Event-propagation │ ├── burger.jpg │ ├── burger2.jpg │ ├── elements.js │ ├── events.js │ ├── index.html │ └── styles.css ├── 12.Running-events-once │ ├── burger.jpg │ ├── burger2.jpg │ ├── elements.js │ ├── events.js │ ├── index.html │ └── styles.css ├── 13.Preventing-default-behaviour-and the-passive-option │ ├── burger.jpg │ ├── burger2.jpg │ ├── elements.js │ ├── events.js │ ├── index.html │ └── styles.css ├── 14.Removing-event-listeners │ ├── events.js │ ├── index.html │ └── styles.css ├── 15.HTML-collection-or-NodeList │ ├── index.html │ └── script.js └── 16.Mini-challenge-create-a-dark-mode-button │ ├── index.html │ ├── script.js │ └── styles.css ├── 05.Time-To-Practice ├── 01.Video-player │ ├── index.html │ ├── script.js │ ├── styles.css │ └── video.mp4 └── 02.Shape-drop-game │ ├── index.html │ ├── script.js │ └── styles.css ├── 06.Loops-And-Conditionals ├── 01.For-loops │ └── index.html ├── 02.For-in-for-of │ └── index.html ├── 03.While-loops │ └── index.html ├── 04.If-else-statements │ └── index.html ├── 05.Else-if │ └── index.html ├── 06.The-switch-statement │ └── index.html ├── 07.Conditional-operator │ └── index.html ├── 08.Type-coercion-conversion │ └── index.html ├── 09.Truthy-falsy │ └── index.html └── 10.Optional-chaining │ └── index.html ├── 07.Objects-In-More-Depth ├── 01.The-object-constructor │ └── index.html ├── 02.Object-constructor-functions │ └── index.html ├── 03.Object-prototypes │ └── index.html ├── 04.Inheriting-object-prototypes │ └── index.html ├── 05.Copying-object-properties │ └── index.html ├── 06.CSS-style-objects │ └── index.html ├── 07.Looping-with-objects │ └── index.html ├── 08.Dynamic-objects │ └── index.html ├── 09.Primitive-reference-types │ └── index.html └── 10.Comparing-objects │ └── index.html ├── 08.Speedy-Chef-Project ├── index.html ├── index.js ├── pizza.svg └── styles.css ├── 09.Scope-Hoisting-Closures ├── 01.Introduction-to-scope │ └── index.html ├── 02.Nesting-scope │ └── index.html ├── 03.Block-function-scope │ └── index.html ├── 04.Hoisting │ └── index.html ├── 05.Temporal-dead-zone │ └── index.html └── 06.Closures │ └── index.html ├── 10.Async-Javascript ├── 01.A-little-bit-of-background │ └── index.html ├── 02.Callback-functions │ └── index.html ├── 03.Promises │ └── index.html ├── 04.The-promise-constructor │ └── index.html ├── 05.Handling-multiple-promises │ └── index.html ├── 06.Async-await │ └── index.html ├── 07.Handling-multiple-awaits │ └── index.html └── 08.Error-handling │ └── index.html └── 11.More-Practice ├── 1.Leaving-so-soon ├── index.html ├── script.js └── styles.css └── 2.Image carousel ├── carousel ├── carousel.css ├── carousel.js └── images │ ├── beach.jpg │ ├── elephants.jpg │ ├── grass.jpg │ ├── lake.jpg │ └── town.jpg └── index.html /01.Javascript-Basics/01.Where-to-add-javascript/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Where to add JavaScript 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /01.Javascript-Basics/02.Async & defer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Async & defer 9 | 10 | 11 | 12 | 13 |

Where to add Javascript

14 | 15 | 16 | -------------------------------------------------------------------------------- /01.Javascript-Basics/02.Async & defer/script1.js: -------------------------------------------------------------------------------- 1 | document.getElementById("title").innerText = "Javascript"; 2 | document.getElementById("title").style.color = "red"; 3 | -------------------------------------------------------------------------------- /01.Javascript-Basics/03.Working with strings/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Working with strings 9 | 10 | 11 | 12 |

Working with strings

13 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /01.Javascript-Basics/04.Storing data with variables/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Storing data with variables 8 | 9 | 10 | 11 |

Storing data with variables

12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /01.Javascript-Basics/05.Mixing-strings-with-variables/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mixing Strings With Variables 8 | 9 | 10 | 11 |

Mixing Strings With Variables

12 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /01.Javascript-Basics/06.Data types: Numbers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Data types: Numbers 9 | 10 | 11 | 12 | 13 |

Data types: Numbers

14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /01.Javascript-Basics/07.Data types: Boolean, null & undefined/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Data types: Boolean, null & undefined 9 | 10 | 11 | 12 | 13 |

Data types: Boolean, null & undefined

14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /01.Javascript-Basics/08.Comments, semicolons and ASI/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Comments, semicolons and ASI 9 | 10 | 11 | 12 | 13 |

Comments, semicolons and ASI

14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /01.Javascript-Basics/09.Operators: Assignment and comparison/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Operators 8 | 9 | 10 | 11 |

Operators: Assignment & comparison

12 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /01.Javascript-Basics/10.Operators: Logical and arithmetic/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Operators: Logical & arithmetic 9 | 10 | 11 | 12 | 13 |

Operators: Logical & arithmetic

14 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /01.Javascript-Basics/11.Introduction-to-arrays/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Introduction To Arrays & Object Types 8 | 9 | 10 | 11 |

Introduction To Arrays & Object Types

12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /01.Javascript-Basics/12.Introduction-to-objects/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Introduction To Objects 8 | 9 | 10 | 11 |

Introduction To Objects

12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /01.Javascript-Basics/13.Introduction-to-functions/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Introduction To Functions 8 | 9 | 10 | 11 |

Introduction To Functions

12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /02.Arrays-In-More-Depth/01.The-array-constructor/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | The Array Constructor 8 | 9 | 10 | 11 |

The Array Constructor

12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /02.Arrays-In-More-Depth/02.Properties-methods-prototype/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Properties, Methods & The Prototype 8 | 9 | 10 | 11 |

Properties, Methods & The Prototype

12 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /02.Arrays-In-More-Depth/03.Modifying-arrays/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Modifying Arrays 8 | 9 | 10 | 11 |

Modifying Arrays

12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /02.Arrays-In-More-Depth/04.Returning-new-values/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Returning New Values 8 | 9 | 10 | 11 |

Returning New Values

12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /02.Arrays-In-More-Depth/05.Iteration Methods/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Iteration Methods 8 | 9 | 10 | 11 |

Iteration Methods

12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /02.Arrays-In-More-Depth/06.Reducers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Reducers 8 | 9 | 10 | 11 |

Reducers

12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /02.Arrays-In-More-Depth/07.Map-forEach/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Map & forEach 8 | 9 | 10 | 11 |

Map & forEach

12 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /02.Arrays-In-More-Depth/08-Array-destructuring/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Array Destructuring 8 | 9 | 10 | 11 |

Array Destructuring

12 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /02.Arrays-In-More-Depth/09.Unique-values-with-set/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Unique Values With Set 8 | 9 | 10 | 11 |

Unique Values With Set

12 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /02.Arrays-In-More-Depth/10.Two-dimensional-arrays/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Two Dimensional Arrays 8 | 9 | 10 | 11 |

Two Dimensional Arrays

12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /03.Functions/01.The-global-object-built-in-functions/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | The Global Object & Built In Functions 8 | 9 | 10 | 11 |

The Global Object & Built In Functions

12 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /03.Functions/02.Function-expressions/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Function Expressions 8 | 9 | 10 | 11 |

Function Expressions

12 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /03.Functions/03.Immediately-invoked-function-expressions/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Immediately Invoked Function Expressions 8 | 9 | 10 | 11 |

Immediately Invoked Function Expressions

12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /03.Functions/04.Anonymous-or-named/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Anonymous Or Named? 8 | 9 | 10 | 11 |

Anonymous Or Named?

12 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /03.Functions/05.A-function-or-a-method/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | A Function Or a Method 8 | 9 | 10 | 11 |

A Function Or a Method

12 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /03.Functions/06.Arrow-functions/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Arrow Functions 8 | 9 | 10 | 11 |

Arrow Functions

12 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /03.Functions/07.Default-parameter-values-and-using-rest/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Default Parameter Values & Using Rest 8 | 9 | 10 | 11 |

Default Parameter Values & Using Rest

12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/01.Selecting-elements/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Selecting Elements 8 | 24 | 25 | 26 | 27 |
28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
30 | Selecting DOM elements 31 |
Select by:Method:
idgetElementById
tag(element name)getElementsByTagName
class namegetElementsByClassName
css selector (first match)querySelector
css selector (all matches)querySelectorAll
57 |
58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/02.Changing-values-and-attributes/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/02.Changing-values-and-attributes/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/02.Changing-values-and-attributes/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Changing Values & Content 8 | 43 | 44 | 45 | 46 |
47 |

Meaty Burgers

48 | 54 |
55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/03.Changing-an-elements-css/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/03.Changing-an-elements-css/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/03.Changing-an-elements-css/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Changing An Elements CSS 8 | 43 | 44 | 45 | 46 |
47 |

48 | Meaty Burgers 49 |

50 | 56 |
57 | 58 | 59 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/04.Creating-new-elements/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/04.Creating-new-elements/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/04.Creating-new-elements/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Creating New Elements 8 | 77 | 78 | 79 | 80 |
81 |

No Meat Burgers

82 | 88 |
89 | 90 | 91 |
92 |

Helping the planet, one bite at a time...

93 |
94 |
95 | burger image 96 |
97 |
98 |

99 | Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolore aut 100 | unde sunt. 101 |

102 | 103 |
104 |
105 |
106 | 107 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/05.Adding-elements-to-the-page/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/05.Adding-elements-to-the-page/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/05.Adding-elements-to-the-page/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Adding Elements To The Page 8 | 77 | 78 | 79 | 80 |
81 |

No Meat Burgers

82 | 88 |
89 | 90 | 91 |
92 |

Helping the planet, one bite at a time...

93 |
94 |
95 | burger image 96 |
97 |
98 |

99 | Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolore aut 100 | unde sunt. 101 |

102 | 103 |
104 |
105 |
106 | 107 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/06.Cloning-and-removing-elements/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/06.Cloning-and-removing-elements/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/06.Cloning-and-removing-elements/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Cloning & Removing Elements 8 | 77 | 78 | 79 | 80 |
81 |

No Meat Burgers

82 | 88 |
89 | 90 | 91 | 106 | 107 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/07.Mini-challenge-create-a-new-section/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/07.Mini-challenge-create-a-new-section/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/07.Mini-challenge-create-a-new-section/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mini Challenge: Create a New Section With Javascript 8 | 9 | 13 | 14 | 15 | 16 | 17 |
18 |

No Meat Burgers

19 | 25 |
26 | 27 | 28 |
29 |

Home cooking time

30 |

Some of our chefs recipes you can try at home

31 | 32 |
33 |
34 | 35 |

Ultimate Vegan

36 |
37 | 2 people ~ 30 mins ~ 38 | 457 calories 39 |
40 |
41 |
42 | 43 |

Spicy Bean Burger

44 |
45 | 4 people ~ 40 mins ~ 46 | 624 calories 47 |
48 |
49 |
50 |
51 | 52 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/07.Mini-challenge-create-a-new-section/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: 'RocknRoll One', sans-serif; 3 | } 4 | 5 | body { 6 | margin: 0 auto; 7 | color: rgb(89, 88, 88); 8 | } 9 | 10 | header { 11 | display: flex; 12 | justify-content: space-between; 13 | align-items: center; 14 | padding: 0 10px; 15 | } 16 | 17 | .planet_wrapper { 18 | background: #74c69d; 19 | } 20 | 21 | .green { 22 | color: rgb(40, 141, 40); 23 | } 24 | 25 | .nav-inline { 26 | display: flex; 27 | list-style: none; 28 | } 29 | 30 | .nav-item { 31 | font-size: 18px; 32 | margin: 0 5px; 33 | text-transform: uppercase; 34 | font-weight: bolder; 35 | color: rgb(89, 88, 88); 36 | cursor: pointer; 37 | } 38 | 39 | img { 40 | width: 100%; 41 | display: block; 42 | } 43 | 44 | section { 45 | text-align: center; 46 | padding: 20px 0; 47 | } 48 | 49 | h3 { 50 | font-family: 'Akaya Kanadaka', cursive; 51 | font-size: 24px; 52 | letter-spacing: 1.5px; 53 | text-transform: uppercase; 54 | margin: 0; 55 | padding: 10px 0; 56 | } 57 | 58 | .content { 59 | display: flex; 60 | align-items: center; 61 | justify-content: center; 62 | } 63 | 64 | .content > div { 65 | flex: 1; 66 | padding: 1rem; 67 | font-size: 18px; 68 | } 69 | 70 | button { 71 | background: rgb(40, 141, 40); 72 | border: none; 73 | border-radius: 3px; 74 | padding: 10px 15px; 75 | cursor: pointer; 76 | font-weight: bolder; 77 | color: whitesmoke; 78 | } 79 | 80 | button:hover { 81 | background: rgb(130, 236, 120); 82 | } 83 | 84 | .info_section p { 85 | font-style: italic; 86 | } 87 | 88 | /* RECIPES SECTION */ 89 | .recipes_container { 90 | display: flex; 91 | justify-content: space-around; 92 | } 93 | 94 | .recipes h4 { 95 | margin: 10px 0; 96 | } 97 | 98 | .recipes article { 99 | background: #74c69d; 100 | margin: 10px; 101 | } 102 | 103 | .recipe_info { 104 | padding: 20px 0; 105 | } 106 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/08.Looping-with-dom-elements/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/08.Looping-with-dom-elements/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/08.Looping-with-dom-elements/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Looping With DOM Elements 8 | 9 | 13 | 14 | 15 | 16 | 17 |
18 |

No Meat Burgers

19 | 25 |
26 | 27 | 28 |
29 |

Home cooking time

30 |

Some of our chefs recipes you can try at home

31 | 32 |
33 |
34 | 35 |

Ultimate Vegan

36 | 37 |
38 | 2 people ~ 30 mins ~ 39 | 457 calories 40 |
41 |
42 |
43 | 44 |

Spicy Bean Burger

45 |
46 | 4 people ~ 40 mins ~ 47 | 624 calories 48 |
49 |
50 |
51 |
52 | 53 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/08.Looping-with-dom-elements/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: 'RocknRoll One', sans-serif; 3 | } 4 | 5 | body { 6 | margin: 0 auto; 7 | color: rgb(89, 88, 88); 8 | } 9 | 10 | header { 11 | display: flex; 12 | justify-content: space-between; 13 | align-items: center; 14 | padding: 0 10px; 15 | } 16 | 17 | .planet_wrapper { 18 | background: #74c69d; 19 | } 20 | 21 | .green { 22 | color: rgb(40, 141, 40); 23 | } 24 | 25 | .nav-inline { 26 | display: flex; 27 | list-style: none; 28 | } 29 | 30 | .nav-item { 31 | font-size: 18px; 32 | margin: 0 5px; 33 | text-transform: uppercase; 34 | font-weight: bolder; 35 | color: rgb(89, 88, 88); 36 | cursor: pointer; 37 | } 38 | 39 | img { 40 | width: 100%; 41 | display: block; 42 | } 43 | 44 | section { 45 | text-align: center; 46 | padding: 20px 0; 47 | } 48 | 49 | h3 { 50 | font-family: 'Akaya Kanadaka', cursive; 51 | font-size: 24px; 52 | letter-spacing: 1.5px; 53 | text-transform: uppercase; 54 | margin: 0; 55 | padding: 10px 0; 56 | } 57 | 58 | .content { 59 | display: flex; 60 | align-items: center; 61 | justify-content: center; 62 | } 63 | 64 | .content > div { 65 | flex: 1; 66 | padding: 1rem; 67 | font-size: 18px; 68 | } 69 | 70 | button { 71 | background: rgb(40, 141, 40); 72 | border: none; 73 | border-radius: 3px; 74 | padding: 10px 15px; 75 | cursor: pointer; 76 | font-weight: bolder; 77 | color: whitesmoke; 78 | } 79 | 80 | button:hover { 81 | background: rgb(130, 236, 120); 82 | } 83 | 84 | .info_section p { 85 | font-style: italic; 86 | } 87 | 88 | /* RECIPES SECTION */ 89 | .recipes_container { 90 | display: flex; 91 | justify-content: space-around; 92 | } 93 | 94 | .recipes h4 { 95 | margin: 10px 0; 96 | } 97 | 98 | .recipes article { 99 | background: #74c69d; 100 | margin: 10px; 101 | } 102 | 103 | .recipe_info { 104 | padding: 20px 0; 105 | } 106 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/09.Listening-for-events/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/09.Listening-for-events/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/09.Listening-for-events/burger2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/09.Listening-for-events/burger2.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/09.Listening-for-events/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Listening For Events 8 | 9 | 13 | 14 | 15 | 16 | 17 |
18 |

No Meat Burgers

19 | 25 |
26 | 27 | 28 |
29 |

Home cooking time

30 |

Some of our chefs recipes you can try at home

31 | 32 |
33 |
34 | 35 |

Ultimate Vegan

36 | 37 |
38 | 2 people ~ 30 mins ~ 39 | 457 calories 40 |
41 |
42 |
43 | 44 |

Spicy Bean Burger

45 |
46 | 4 people ~ 40 mins ~ 47 | 624 calories 48 |
49 |
50 |
51 |
52 | 53 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/09.Listening-for-events/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: 'RocknRoll One', sans-serif; 3 | } 4 | 5 | body { 6 | margin: 0 auto; 7 | color: rgb(89, 88, 88); 8 | } 9 | 10 | header { 11 | display: flex; 12 | justify-content: space-between; 13 | align-items: center; 14 | padding: 0 10px; 15 | } 16 | 17 | .planet_wrapper { 18 | background: #74c69d; 19 | } 20 | 21 | .green { 22 | color: rgb(40, 141, 40); 23 | } 24 | 25 | .nav-inline { 26 | display: flex; 27 | list-style: none; 28 | } 29 | 30 | .nav-item { 31 | font-size: 18px; 32 | margin: 0 5px; 33 | text-transform: uppercase; 34 | font-weight: bolder; 35 | color: rgb(89, 88, 88); 36 | cursor: pointer; 37 | } 38 | 39 | img { 40 | width: 100%; 41 | display: block; 42 | } 43 | 44 | section { 45 | text-align: center; 46 | padding: 20px 0; 47 | } 48 | 49 | h3 { 50 | font-family: 'Akaya Kanadaka', cursive; 51 | font-size: 24px; 52 | letter-spacing: 1.5px; 53 | text-transform: uppercase; 54 | margin: 0; 55 | padding: 10px 0; 56 | } 57 | 58 | .content { 59 | display: flex; 60 | align-items: center; 61 | justify-content: center; 62 | } 63 | 64 | .content > div { 65 | flex: 1; 66 | padding: 1rem; 67 | font-size: 18px; 68 | } 69 | 70 | button { 71 | background: rgb(40, 141, 40); 72 | border: none; 73 | border-radius: 3px; 74 | padding: 10px 15px; 75 | cursor: pointer; 76 | font-weight: bolder; 77 | color: whitesmoke; 78 | } 79 | 80 | button:hover { 81 | background: rgb(130, 236, 120); 82 | } 83 | 84 | .info_section p { 85 | font-style: italic; 86 | } 87 | 88 | /* RECIPES SECTION */ 89 | .recipes_container { 90 | display: flex; 91 | justify-content: space-around; 92 | } 93 | 94 | .recipes h4 { 95 | margin: 10px 0; 96 | } 97 | 98 | .recipes article { 99 | background: #74c69d; 100 | margin: 10px; 101 | } 102 | 103 | .recipe_info { 104 | padding: 20px 0; 105 | } 106 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/10.Listening-for-multiple-events-and-event-data/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/10.Listening-for-multiple-events-and-event-data/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/10.Listening-for-multiple-events-and-event-data/burger2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/10.Listening-for-multiple-events-and-event-data/burger2.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/10.Listening-for-multiple-events-and-event-data/elements.js: -------------------------------------------------------------------------------- 1 | // ========= SECTION HEADING ========= 2 | const sectionHeading = document.createElement('h3'); 3 | const headingText = document.createTextNode( 4 | 'Helping the planet, one bite at a time...' 5 | ); 6 | sectionHeading.appendChild(headingText); 7 | 8 | // ========= IMAGE ========= 9 | const imageElement = document.createElement('img'); 10 | imageElement.setAttribute('src', 'burger.jpg'); 11 | imageElement.setAttribute('alt', 'burger image'); 12 | 13 | // ========= INFO TEXT ========= 14 | const infoSectionElement = document.createElement('p'); 15 | const infoSectionText = document.createTextNode( 16 | 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolore aut unde sunt.' 17 | ); 18 | infoSectionElement.appendChild(infoSectionText); 19 | 20 | // ========= BUTTON ========= 21 | const buttonElement = document.createElement('button'); 22 | const buttonText = document.createTextNode('BUY ONLINE'); 23 | // add 24 | // buttonElement.id = 'buy'; 25 | buttonElement.appendChild(buttonText); 26 | 27 | // ========= WRAPPERS ========= 28 | const sectionWrapper = document.createElement('section'); 29 | const contentWrapper = document.createElement('div'); 30 | const imageDivElement = document.createElement('div'); 31 | const textDivElement = document.createElement('div'); 32 | 33 | // ========= PUTTING IT ALL TOGETHER ========= 34 | textDivElement.appendChild(infoSectionElement); 35 | textDivElement.appendChild(buttonElement); 36 | 37 | imageDivElement.appendChild(imageElement); 38 | 39 | contentWrapper.appendChild(imageDivElement); 40 | contentWrapper.appendChild(textDivElement); 41 | 42 | sectionWrapper.appendChild(sectionHeading); 43 | sectionWrapper.appendChild(contentWrapper); 44 | 45 | // ========= ADDING CLASSES ========= 46 | sectionWrapper.setAttribute('class', 'planet_wrapper'); 47 | contentWrapper.setAttribute('class', 'content'); 48 | imageDivElement.setAttribute('class', 'image_section'); 49 | textDivElement.setAttribute('class', 'info_section'); 50 | 51 | // ADD TO PAGE 52 | document.body.insertBefore(sectionWrapper, document.querySelector('.recipes')); 53 | 54 | // ========= LOOPING ========= 55 | const listItems = document.querySelectorAll('li'); 56 | const links = ['our burgers', 'history']; 57 | links.forEach(function (link) { 58 | const listElement = document.createElement('li'); 59 | const listText = document.createTextNode(link); 60 | listElement.appendChild(listText); 61 | listElement.classList.add('nav-item'); 62 | document.querySelector('ul').appendChild(listElement); 63 | }); 64 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/10.Listening-for-multiple-events-and-event-data/events.js: -------------------------------------------------------------------------------- 1 | const headerImage = document.querySelector('#headerImage'); 2 | function changeImage() { 3 | headerImage.setAttribute('src', 'burger2.jpg'); 4 | } 5 | headerImage.addEventListener('click', changeImage) 6 | 7 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/10.Listening-for-multiple-events-and-event-data/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Listening For Multiple Events & Event Data 8 | 9 | 13 | 14 | 15 | 16 | 17 |
18 |

No Meat Burgers

19 | 25 |
26 | 28 | 29 |
30 |

Home cooking time

31 |

Some of our chefs recipes you can try at home

32 | 33 |
34 |
35 | 36 | 37 | 38 |

Ultimate Vegan

39 | 40 |
41 | 2 people ~ 30 mins ~ 42 | 457 calories 43 |
44 |
45 |
46 | 47 | 48 | 49 |

Spicy Bean Burger

50 |
51 | 52 | 4 people ~ 40 mins ~ 53 | 624 calories 54 |
55 |
56 |
57 |
58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/10.Listening-for-multiple-events-and-event-data/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: 'RocknRoll One', sans-serif; 3 | } 4 | 5 | body { 6 | margin: 0 auto; 7 | color: rgb(89, 88, 88); 8 | } 9 | 10 | header { 11 | display: flex; 12 | justify-content: space-between; 13 | align-items: center; 14 | padding: 0 10px; 15 | } 16 | 17 | .planet_wrapper { 18 | background: #74c69d; 19 | } 20 | 21 | .green { 22 | color: rgb(40, 141, 40); 23 | } 24 | 25 | .nav-inline { 26 | display: flex; 27 | list-style: none; 28 | } 29 | 30 | .nav-item { 31 | font-size: 18px; 32 | margin: 0 5px; 33 | text-transform: uppercase; 34 | font-weight: bolder; 35 | color: rgb(89, 88, 88); 36 | cursor: pointer; 37 | } 38 | 39 | img { 40 | width: 100%; 41 | display: block; 42 | } 43 | 44 | section { 45 | text-align: center; 46 | padding: 20px 0; 47 | } 48 | 49 | h3 { 50 | font-family: 'Akaya Kanadaka', cursive; 51 | font-size: 24px; 52 | letter-spacing: 1.5px; 53 | text-transform: uppercase; 54 | margin: 0; 55 | padding: 10px 0; 56 | } 57 | 58 | .content { 59 | display: flex; 60 | align-items: center; 61 | justify-content: center; 62 | } 63 | 64 | .content > div { 65 | flex: 1; 66 | padding: 1rem; 67 | font-size: 18px; 68 | } 69 | 70 | button { 71 | background: rgb(40, 141, 40); 72 | border: none; 73 | border-radius: 3px; 74 | padding: 10px 15px; 75 | cursor: pointer; 76 | font-weight: bolder; 77 | color: whitesmoke; 78 | } 79 | 80 | button:hover { 81 | background: rgb(130, 236, 120); 82 | } 83 | 84 | .info_section p { 85 | font-style: italic; 86 | } 87 | 88 | /* RECIPES SECTION */ 89 | .recipes_container { 90 | display: flex; 91 | justify-content: space-around; 92 | } 93 | 94 | .recipes h4 { 95 | margin: 10px 0; 96 | } 97 | 98 | .recipes article { 99 | background: #74c69d; 100 | margin: 10px; 101 | } 102 | 103 | .recipe_info { 104 | padding: 20px 0; 105 | } 106 | 107 | 108 | .add { 109 | cursor: pointer; 110 | } -------------------------------------------------------------------------------- /04.Events-And-The-DOM/11.Event-propagation/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/11.Event-propagation/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/11.Event-propagation/burger2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/11.Event-propagation/burger2.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/11.Event-propagation/elements.js: -------------------------------------------------------------------------------- 1 | // ========= SECTION HEADING ========= 2 | const sectionHeading = document.createElement('h3'); 3 | const headingText = document.createTextNode( 4 | 'Helping the planet, one bite at a time...' 5 | ); 6 | sectionHeading.appendChild(headingText); 7 | 8 | // ========= IMAGE ========= 9 | const imageElement = document.createElement('img'); 10 | imageElement.setAttribute('src', 'burger.jpg'); 11 | imageElement.setAttribute('alt', 'burger image'); 12 | 13 | // ========= INFO TEXT ========= 14 | const infoSectionElement = document.createElement('p'); 15 | const infoSectionText = document.createTextNode( 16 | 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolore aut unde sunt.' 17 | ); 18 | infoSectionElement.appendChild(infoSectionText); 19 | 20 | // ========= BUTTON ========= 21 | const buttonElement = document.createElement('button'); 22 | const buttonText = document.createTextNode('BUY ONLINE'); 23 | // add 24 | // buttonElement.id = 'buy'; 25 | buttonElement.appendChild(buttonText); 26 | 27 | // ========= WRAPPERS ========= 28 | const sectionWrapper = document.createElement('section'); 29 | const contentWrapper = document.createElement('div'); 30 | const imageDivElement = document.createElement('div'); 31 | const textDivElement = document.createElement('div'); 32 | 33 | // ========= PUTTING IT ALL TOGETHER ========= 34 | textDivElement.appendChild(infoSectionElement); 35 | textDivElement.appendChild(buttonElement); 36 | 37 | imageDivElement.appendChild(imageElement); 38 | 39 | contentWrapper.appendChild(imageDivElement); 40 | contentWrapper.appendChild(textDivElement); 41 | 42 | sectionWrapper.appendChild(sectionHeading); 43 | sectionWrapper.appendChild(contentWrapper); 44 | 45 | // ========= ADDING CLASSES ========= 46 | sectionWrapper.setAttribute('class', 'planet_wrapper'); 47 | contentWrapper.setAttribute('class', 'content'); 48 | imageDivElement.setAttribute('class', 'image_section'); 49 | textDivElement.setAttribute('class', 'info_section'); 50 | 51 | // ADD TO PAGE 52 | document.body.insertBefore(sectionWrapper, document.querySelector('.recipes')); 53 | 54 | // ========= LOOPING ========= 55 | const listItems = document.querySelectorAll('li'); 56 | const links = ['our burgers', 'history']; 57 | links.forEach(function (link) { 58 | const listElement = document.createElement('li'); 59 | const listText = document.createTextNode(link); 60 | listElement.appendChild(listText); 61 | listElement.classList.add('nav-item'); 62 | document.querySelector('ul').appendChild(listElement); 63 | }); 64 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/11.Event-propagation/events.js: -------------------------------------------------------------------------------- 1 | const headerImage = document.querySelector('#headerImage'); 2 | function changeImage() { 3 | headerImage.setAttribute('src', 'burger2.jpg'); 4 | } 5 | headerImage.addEventListener('click', changeImage) 6 | 7 | function addToFavourites(e) { 8 | alert(`${e.target.parentNode.children[2].innerText}`) 9 | } 10 | 11 | const addButtons = document.querySelectorAll(".add"); 12 | addButtons.forEach(function(button) { 13 | button.addEventListener('click', addToFavourites) 14 | }) 15 | 16 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/11.Event-propagation/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Event Propagation 8 | 9 | 13 | 14 | 15 | 16 | 17 |
18 |

No Meat Burgers

19 | 25 |
26 | 28 | 29 |
30 |

Home cooking time

31 |

Some of our chefs recipes you can try at home

32 | 33 |
34 |
35 | 36 | 37 |

Ultimate Vegan

38 |
39 | 2 people ~ 30 mins ~ 40 | 457 calories 41 |
42 |
43 |
44 | 45 | 46 |

Spicy Bean Burger

47 |
48 | 4 people ~ 40 mins ~ 49 | 624 calories 50 |
51 |
52 |
53 |
54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/11.Event-propagation/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: 'RocknRoll One', sans-serif; 3 | } 4 | 5 | body { 6 | margin: 0 auto; 7 | color: rgb(89, 88, 88); 8 | } 9 | 10 | header { 11 | display: flex; 12 | justify-content: space-between; 13 | align-items: center; 14 | padding: 0 10px; 15 | } 16 | 17 | .planet_wrapper { 18 | background: #74c69d; 19 | } 20 | 21 | .green { 22 | color: rgb(40, 141, 40); 23 | } 24 | 25 | .nav-inline { 26 | display: flex; 27 | list-style: none; 28 | } 29 | 30 | .nav-item { 31 | font-size: 18px; 32 | margin: 0 5px; 33 | text-transform: uppercase; 34 | font-weight: bolder; 35 | color: rgb(89, 88, 88); 36 | cursor: pointer; 37 | } 38 | 39 | img { 40 | width: 100%; 41 | display: block; 42 | } 43 | 44 | section { 45 | text-align: center; 46 | padding: 20px 0; 47 | } 48 | 49 | h3 { 50 | font-family: 'Akaya Kanadaka', cursive; 51 | font-size: 24px; 52 | letter-spacing: 1.5px; 53 | text-transform: uppercase; 54 | margin: 0; 55 | padding: 10px 0; 56 | } 57 | 58 | .content { 59 | display: flex; 60 | align-items: center; 61 | justify-content: center; 62 | } 63 | 64 | .content > div { 65 | flex: 1; 66 | padding: 1rem; 67 | font-size: 18px; 68 | } 69 | 70 | button { 71 | background: rgb(40, 141, 40); 72 | border: none; 73 | border-radius: 3px; 74 | padding: 10px 15px; 75 | cursor: pointer; 76 | font-weight: bolder; 77 | color: whitesmoke; 78 | } 79 | 80 | button:hover { 81 | background: rgb(130, 236, 120); 82 | } 83 | 84 | .info_section p { 85 | font-style: italic; 86 | } 87 | 88 | /* RECIPES SECTION */ 89 | .recipes_container { 90 | display: flex; 91 | justify-content: space-around; 92 | } 93 | 94 | .recipes h4 { 95 | margin: 10px 0; 96 | } 97 | 98 | .recipes article { 99 | background: #74c69d; 100 | margin: 10px; 101 | } 102 | 103 | .recipe_info { 104 | padding: 20px 0; 105 | } 106 | 107 | 108 | .add { 109 | cursor: pointer; 110 | } -------------------------------------------------------------------------------- /04.Events-And-The-DOM/12.Running-events-once/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/12.Running-events-once/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/12.Running-events-once/burger2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/12.Running-events-once/burger2.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/12.Running-events-once/elements.js: -------------------------------------------------------------------------------- 1 | // ========= SECTION HEADING ========= 2 | const sectionHeading = document.createElement('h3'); 3 | const headingText = document.createTextNode( 4 | 'Helping the planet, one bite at a time...' 5 | ); 6 | sectionHeading.appendChild(headingText); 7 | 8 | // ========= IMAGE ========= 9 | const imageElement = document.createElement('img'); 10 | imageElement.setAttribute('src', 'burger.jpg'); 11 | imageElement.setAttribute('alt', 'burger image'); 12 | 13 | // ========= INFO TEXT ========= 14 | const infoSectionElement = document.createElement('p'); 15 | const infoSectionText = document.createTextNode( 16 | 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolore aut unde sunt.' 17 | ); 18 | infoSectionElement.appendChild(infoSectionText); 19 | 20 | // ========= BUTTON ========= 21 | const buttonElement = document.createElement('button'); 22 | const buttonText = document.createTextNode('BUY ONLINE'); 23 | // add 24 | // buttonElement.id = 'buy'; 25 | buttonElement.appendChild(buttonText); 26 | 27 | // ========= WRAPPERS ========= 28 | const sectionWrapper = document.createElement('section'); 29 | const contentWrapper = document.createElement('div'); 30 | const imageDivElement = document.createElement('div'); 31 | const textDivElement = document.createElement('div'); 32 | 33 | // ========= PUTTING IT ALL TOGETHER ========= 34 | textDivElement.appendChild(infoSectionElement); 35 | textDivElement.appendChild(buttonElement); 36 | 37 | imageDivElement.appendChild(imageElement); 38 | 39 | contentWrapper.appendChild(imageDivElement); 40 | contentWrapper.appendChild(textDivElement); 41 | 42 | sectionWrapper.appendChild(sectionHeading); 43 | sectionWrapper.appendChild(contentWrapper); 44 | 45 | // ========= ADDING CLASSES ========= 46 | sectionWrapper.setAttribute('class', 'planet_wrapper'); 47 | contentWrapper.setAttribute('class', 'content'); 48 | imageDivElement.setAttribute('class', 'image_section'); 49 | textDivElement.setAttribute('class', 'info_section'); 50 | 51 | // ADD TO PAGE 52 | document.body.insertBefore(sectionWrapper, document.querySelector('.recipes')); 53 | 54 | // ========= LOOPING ========= 55 | const listItems = document.querySelectorAll('li'); 56 | const links = ['our burgers', 'history']; 57 | links.forEach(function (link) { 58 | const listElement = document.createElement('li'); 59 | const listText = document.createTextNode(link); 60 | listElement.appendChild(listText); 61 | listElement.classList.add('nav-item'); 62 | document.querySelector('ul').appendChild(listElement); 63 | }); 64 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/12.Running-events-once/events.js: -------------------------------------------------------------------------------- 1 | const headerImage = document.querySelector('#headerImage'); 2 | function changeImage() { 3 | headerImage.setAttribute('src', 'burger2.jpg'); 4 | } 5 | headerImage.addEventListener('click', changeImage) 6 | 7 | function addToFavourites(e) { 8 | e.stopPropagation() 9 | alert(`${e.target.parentNode.children[2].innerText}`) 10 | } 11 | 12 | const addButtons = document.querySelectorAll(".add"); 13 | addButtons.forEach(function(button) { 14 | button.addEventListener('click', addToFavourites) 15 | }) 16 | 17 | function redirect(e) { 18 | alert('recipe clicked') 19 | } 20 | 21 | const recipeTitles = document.querySelectorAll("article "); 22 | recipeTitles.forEach(function(title) { 23 | title.addEventListener('click', redirect) 24 | }) -------------------------------------------------------------------------------- /04.Events-And-The-DOM/12.Running-events-once/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Running Events Once 8 | 9 | 13 | 14 | 15 | 16 | 17 |
18 |

No Meat Burgers

19 | 25 |
26 | 28 | 29 |
30 |

Home cooking time

31 |

Some of our chefs recipes you can try at home

32 | 33 |
34 |
35 | 36 | 37 |

Ultimate Vegan

38 |
39 | 2 people ~ 30 mins ~ 40 | 457 calories 41 |
42 |
43 |
44 | 45 | 46 |

Spicy Bean Burger

47 |
48 | 4 people ~ 40 mins ~ 49 | 624 calories 50 |
51 |
52 |
53 |
54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/12.Running-events-once/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: 'RocknRoll One', sans-serif; 3 | } 4 | 5 | body { 6 | margin: 0 auto; 7 | color: rgb(89, 88, 88); 8 | } 9 | 10 | header { 11 | display: flex; 12 | justify-content: space-between; 13 | align-items: center; 14 | padding: 0 10px; 15 | } 16 | 17 | .planet_wrapper { 18 | background: #74c69d; 19 | } 20 | 21 | .green { 22 | color: rgb(40, 141, 40); 23 | } 24 | 25 | .nav-inline { 26 | display: flex; 27 | list-style: none; 28 | } 29 | 30 | .nav-item { 31 | font-size: 18px; 32 | margin: 0 5px; 33 | text-transform: uppercase; 34 | font-weight: bolder; 35 | color: rgb(89, 88, 88); 36 | cursor: pointer; 37 | } 38 | 39 | img { 40 | width: 100%; 41 | display: block; 42 | } 43 | 44 | section { 45 | text-align: center; 46 | padding: 20px 0; 47 | } 48 | 49 | h3 { 50 | font-family: 'Akaya Kanadaka', cursive; 51 | font-size: 24px; 52 | letter-spacing: 1.5px; 53 | text-transform: uppercase; 54 | margin: 0; 55 | padding: 10px 0; 56 | } 57 | 58 | .content { 59 | display: flex; 60 | align-items: center; 61 | justify-content: center; 62 | } 63 | 64 | .content > div { 65 | flex: 1; 66 | padding: 1rem; 67 | font-size: 18px; 68 | } 69 | 70 | button { 71 | background: rgb(40, 141, 40); 72 | border: none; 73 | border-radius: 3px; 74 | padding: 10px 15px; 75 | cursor: pointer; 76 | font-weight: bolder; 77 | color: whitesmoke; 78 | } 79 | 80 | button:hover { 81 | background: rgb(130, 236, 120); 82 | } 83 | 84 | .info_section p { 85 | font-style: italic; 86 | } 87 | 88 | /* RECIPES SECTION */ 89 | .recipes_container { 90 | display: flex; 91 | justify-content: space-around; 92 | } 93 | 94 | .recipes h4 { 95 | margin: 10px 0; 96 | } 97 | 98 | .recipes article { 99 | background: #74c69d; 100 | margin: 10px; 101 | } 102 | 103 | .recipe_info { 104 | padding: 20px 0; 105 | } 106 | 107 | 108 | .add { 109 | cursor: pointer; 110 | } -------------------------------------------------------------------------------- /04.Events-And-The-DOM/13.Preventing-default-behaviour-and the-passive-option/burger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/13.Preventing-default-behaviour-and the-passive-option/burger.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/13.Preventing-default-behaviour-and the-passive-option/burger2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/13.Preventing-default-behaviour-and the-passive-option/burger2.jpg -------------------------------------------------------------------------------- /04.Events-And-The-DOM/13.Preventing-default-behaviour-and the-passive-option/elements.js: -------------------------------------------------------------------------------- 1 | // ========= SECTION HEADING ========= 2 | const sectionHeading = document.createElement('h3'); 3 | const headingText = document.createTextNode( 4 | 'Helping the planet, one bite at a time...' 5 | ); 6 | sectionHeading.appendChild(headingText); 7 | 8 | // ========= IMAGE ========= 9 | const imageElement = document.createElement('img'); 10 | imageElement.setAttribute('src', 'burger.jpg'); 11 | imageElement.setAttribute('alt', 'burger image'); 12 | 13 | // ========= INFO TEXT ========= 14 | const infoSectionElement = document.createElement('p'); 15 | const infoSectionText = document.createTextNode( 16 | 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolore aut unde sunt.' 17 | ); 18 | infoSectionElement.appendChild(infoSectionText); 19 | 20 | // ========= BUTTON ========= 21 | const buttonElement = document.createElement('button'); 22 | const buttonText = document.createTextNode('BUY ONLINE'); 23 | // add 24 | // buttonElement.id = 'buy'; 25 | buttonElement.appendChild(buttonText); 26 | 27 | // ========= WRAPPERS ========= 28 | const sectionWrapper = document.createElement('section'); 29 | const contentWrapper = document.createElement('div'); 30 | const imageDivElement = document.createElement('div'); 31 | const textDivElement = document.createElement('div'); 32 | 33 | // ========= PUTTING IT ALL TOGETHER ========= 34 | textDivElement.appendChild(infoSectionElement); 35 | textDivElement.appendChild(buttonElement); 36 | 37 | imageDivElement.appendChild(imageElement); 38 | 39 | contentWrapper.appendChild(imageDivElement); 40 | contentWrapper.appendChild(textDivElement); 41 | 42 | sectionWrapper.appendChild(sectionHeading); 43 | sectionWrapper.appendChild(contentWrapper); 44 | 45 | // ========= ADDING CLASSES ========= 46 | sectionWrapper.setAttribute('class', 'planet_wrapper'); 47 | contentWrapper.setAttribute('class', 'content'); 48 | imageDivElement.setAttribute('class', 'image_section'); 49 | textDivElement.setAttribute('class', 'info_section'); 50 | 51 | // ADD TO PAGE 52 | document.body.insertBefore(sectionWrapper, document.querySelector('.recipes')); 53 | 54 | // ========= LOOPING ========= 55 | const listItems = document.querySelectorAll('li'); 56 | const links = ['our burgers', 'history']; 57 | links.forEach(function (link) { 58 | const listElement = document.createElement('li'); 59 | const listText = document.createTextNode(link); 60 | listElement.appendChild(listText); 61 | listElement.classList.add('nav-item'); 62 | document.querySelector('ul').appendChild(listElement); 63 | }); 64 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/13.Preventing-default-behaviour-and the-passive-option/events.js: -------------------------------------------------------------------------------- 1 | const headerImage = document.querySelector('#headerImage'); 2 | function changeImage() { 3 | headerImage.setAttribute('src', 'burger2.jpg'); 4 | } 5 | headerImage.addEventListener('click', changeImage) 6 | 7 | function addToFavourites(e) { 8 | e.stopPropagation() 9 | alert(`${e.target.parentNode.children[2].innerText}`) 10 | } 11 | 12 | const addButtons = document.querySelectorAll(".add"); 13 | addButtons.forEach(function(button) { 14 | button.addEventListener('click', addToFavourites, {once: true}) 15 | }) 16 | 17 | function redirect(e) { 18 | alert('recipe clicked') 19 | } 20 | 21 | const recipeTitles = document.querySelectorAll("article "); 22 | recipeTitles.forEach(function(title) { 23 | title.addEventListener('click', redirect) 24 | }) 25 | 26 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/13.Preventing-default-behaviour-and the-passive-option/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Prevent Default Behaviour & The Passive Option 8 | 9 | 13 | 14 | 15 | 16 | 17 |
18 |

No Meat Burgers

19 | 25 |
26 | 28 | 29 |
30 |

Home cooking time

31 |

Some of our chefs recipes you can try at home

32 | 33 |
34 |
35 | 36 | 37 |

Ultimate Vegan

38 |
39 | 2 people ~ 30 mins ~ 40 | 457 calories 41 |
42 |
43 |
44 | 45 | 46 |

Spicy Bean Burger

47 |
48 | 4 people ~ 40 mins ~ 49 | 624 calories 50 |
51 |
52 |
53 |
54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/13.Preventing-default-behaviour-and the-passive-option/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: 'RocknRoll One', sans-serif; 3 | } 4 | 5 | body { 6 | margin: 0 auto; 7 | color: rgb(89, 88, 88); 8 | } 9 | 10 | header { 11 | display: flex; 12 | justify-content: space-between; 13 | align-items: center; 14 | padding: 0 10px; 15 | } 16 | 17 | .planet_wrapper { 18 | background: #74c69d; 19 | } 20 | 21 | .green { 22 | color: rgb(40, 141, 40); 23 | } 24 | 25 | .nav-inline { 26 | display: flex; 27 | list-style: none; 28 | } 29 | 30 | .nav-item { 31 | font-size: 18px; 32 | margin: 0 5px; 33 | text-transform: uppercase; 34 | font-weight: bolder; 35 | color: rgb(89, 88, 88); 36 | cursor: pointer; 37 | } 38 | 39 | img { 40 | width: 100%; 41 | display: block; 42 | } 43 | 44 | section { 45 | text-align: center; 46 | padding: 20px 0; 47 | } 48 | 49 | h3 { 50 | font-family: 'Akaya Kanadaka', cursive; 51 | font-size: 24px; 52 | letter-spacing: 1.5px; 53 | text-transform: uppercase; 54 | margin: 0; 55 | padding: 10px 0; 56 | } 57 | 58 | .content { 59 | display: flex; 60 | align-items: center; 61 | justify-content: center; 62 | } 63 | 64 | .content > div { 65 | flex: 1; 66 | padding: 1rem; 67 | font-size: 18px; 68 | } 69 | 70 | button { 71 | background: rgb(40, 141, 40); 72 | border: none; 73 | border-radius: 3px; 74 | padding: 10px 15px; 75 | cursor: pointer; 76 | font-weight: bolder; 77 | color: whitesmoke; 78 | } 79 | 80 | button:hover { 81 | background: rgb(130, 236, 120); 82 | } 83 | 84 | .info_section p { 85 | font-style: italic; 86 | } 87 | 88 | /* RECIPES SECTION */ 89 | .recipes_container { 90 | display: flex; 91 | justify-content: space-around; 92 | } 93 | 94 | .recipes h4 { 95 | margin: 10px 0; 96 | } 97 | 98 | .recipes article { 99 | background: #74c69d; 100 | margin: 10px; 101 | } 102 | 103 | .recipe_info { 104 | padding: 20px 0; 105 | } 106 | 107 | 108 | .add { 109 | cursor: pointer; 110 | } 111 | 112 | /* FORM SECTION */ 113 | .signup { 114 | padding: 10px; 115 | background: rgb(249, 230, 205); 116 | } 117 | 118 | form { 119 | display: flex; 120 | justify-content: center; 121 | } 122 | 123 | form > div { 124 | padding: 20px 10px; 125 | } 126 | 127 | input { 128 | border: none; 129 | border-radius: 3px; 130 | } 131 | 132 | input[type=submit] { 133 | background: #74c69d; 134 | cursor: pointer; 135 | } -------------------------------------------------------------------------------- /04.Events-And-The-DOM/14.Removing-event-listeners/events.js: -------------------------------------------------------------------------------- 1 | const add = document.querySelector('#add'); 2 | const cancel = document.querySelector('#cancel'); 3 | const output = document.querySelector('p'); 4 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/14.Removing-event-listeners/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Removing Event Listeners 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Score:

0

20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/14.Removing-event-listeners/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: 'RocknRoll One', sans-serif; 3 | } 4 | 5 | 6 | button { 7 | background: rgb(116, 203, 116); 8 | border: none; 9 | border-radius: 3px; 10 | padding: 10px 15px; 11 | cursor: pointer; 12 | font-weight: bolder; 13 | color: whitesmoke; 14 | } 15 | 16 | button:hover { 17 | background: rgb(130, 236, 120); 18 | } 19 | 20 | #cancel { 21 | background: rgb(237, 126, 126); 22 | } 23 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/15.HTML-collection-or-NodeList/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | HTMLCollection Or NodeList? 8 | 9 | 10 | 11 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/15.HTML-collection-or-NodeList/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/04.Events-And-The-DOM/15.HTML-collection-or-NodeList/script.js -------------------------------------------------------------------------------- /04.Events-And-The-DOM/16.Mini-challenge-create-a-dark-mode-button/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mini Challenge: Build a Dark Mode Button 8 | 9 | 10 | 11 | 12 |
13 |

Night Or Day

14 | 15 | 16 |
17 |
18 | 19 |
20 |
21 |

New this week

22 |

23 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Sapiente 24 | molestiae at culpa similique ratione quibusdam! Iusto, tempore. 25 | Voluptate quibusdam non omnis odio animi ducimus ipsa dolor? Dolores 26 | at sunt ipsa. 27 |

28 |
29 |
30 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/16.Mini-challenge-create-a-dark-mode-button/script.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /04.Events-And-The-DOM/16.Mini-challenge-create-a-dark-mode-button/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: rgb(62, 62, 62); 3 | background: rgb(249, 246, 246); 4 | } 5 | 6 | .dark { 7 | color: rgb(219, 219, 219); 8 | background: rgb(44, 36, 36); 9 | } 10 | 11 | header { 12 | display: flex; 13 | justify-content: space-between; 14 | align-items: center; 15 | } 16 | 17 | button { 18 | cursor: pointer; 19 | height: 50px; 20 | width: 50px; 21 | border: none; 22 | background: none; 23 | font-size: 30px; 24 | } 25 | 26 | article, 27 | aside { 28 | border: 1px solid lightgray; 29 | border-radius: 5px; 30 | margin: 10px 0; 31 | padding: 10px; 32 | } 33 | -------------------------------------------------------------------------------- /05.Time-To-Practice/01.Video-player/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Video Player 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /05.Time-To-Practice/01.Video-player/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/05.Time-To-Practice/01.Video-player/script.js -------------------------------------------------------------------------------- /05.Time-To-Practice/01.Video-player/styles.css: -------------------------------------------------------------------------------- 1 | video { 2 | width: 100%; 3 | } 4 | 5 | .controls { 6 | display: flex; 7 | flex-direction: column; 8 | align-items: center; 9 | } 10 | 11 | div, 12 | progress { 13 | margin-bottom: 20px; 14 | } 15 | 16 | progress { 17 | width: 100%; 18 | } 19 | 20 | button { 21 | background: rgb(153, 166, 178); 22 | color: rgb(45, 45, 45); 23 | border: none; 24 | font-size: 20px; 25 | padding: 10px 15px; 26 | border-radius: 3px; 27 | cursor: pointer; 28 | margin: 0 5px; 29 | } 30 | 31 | button:hover { 32 | transform: scale(1.03); 33 | } 34 | 35 | .round { 36 | border: 4px solid rgb(153, 166, 178); 37 | background: none; 38 | border-radius: 100%; 39 | width: 100px; 40 | height: 100px; 41 | } 42 | 43 | .skip { 44 | font-size: 36px; 45 | cursor: pointer; 46 | background: none; 47 | color: rgb(153, 166, 178); 48 | padding: 0; 49 | } 50 | 51 | .align { 52 | display: flex; 53 | } 54 | -------------------------------------------------------------------------------- /05.Time-To-Practice/01.Video-player/video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/05.Time-To-Practice/01.Video-player/video.mp4 -------------------------------------------------------------------------------- /05.Time-To-Practice/02.Shape-drop-game/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Shape Drop Game 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /05.Time-To-Practice/02.Shape-drop-game/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/05.Time-To-Practice/02.Shape-drop-game/script.js -------------------------------------------------------------------------------- /05.Time-To-Practice/02.Shape-drop-game/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | background: rgb(149, 127, 239); 3 | font-family: "Comfortaa", cursive; 4 | color: rgb(60, 60, 60); 5 | } 6 | 7 | body { 8 | background: rgb(239, 217, 206); 9 | max-width: 600px; 10 | margin: 0 auto; 11 | height: 100vh; 12 | } 13 | 14 | header { 15 | background: rgb(222, 192, 241); 16 | text-align: center; 17 | padding: 10px; 18 | } 19 | 20 | button { 21 | cursor: pointer; 22 | background: none; 23 | border: 2px solid rgb(149, 127, 239); 24 | padding: 5px 10px; 25 | border-radius: 5px; 26 | } 27 | 28 | .drop-section, 29 | .drag-section { 30 | display: flex; 31 | justify-content: space-around; 32 | flex-wrap: wrap; 33 | } 34 | 35 | .drag-section > div { 36 | cursor: pointer; 37 | border: none; 38 | } 39 | 40 | .drag-section { 41 | margin-bottom: 20px; 42 | } 43 | 44 | div { 45 | margin: 15px; 46 | border: 2px solid rgb(183, 156, 237); 47 | border-radius: 3px; 48 | } 49 | 50 | .square { 51 | width: 50px; 52 | height: 50px; 53 | background: rgb(247, 100, 100); 54 | } 55 | .square2 { 56 | width: 42px; 57 | height: 42px; 58 | background: rgb(110, 131, 235); 59 | } 60 | .rectangle { 61 | width: 80px; 62 | height: 50px; 63 | background: rgb(230, 67, 230); 64 | } 65 | .circle { 66 | width: 50px; 67 | height: 50px; 68 | border-radius: 100%; 69 | background: rgb(245, 183, 68); 70 | } 71 | .oval { 72 | width: 70px; 73 | height: 50px; 74 | border-radius: 100%; 75 | background: rgb(209, 143, 154); 76 | } 77 | .oval2 { 78 | width: 75px; 79 | height: 50px; 80 | border-radius: 100%; 81 | background: rgb(223, 100, 161); 82 | } 83 | .pill { 84 | width: 100px; 85 | height: 50px; 86 | border-radius: 25px; 87 | background: rgb(94, 82, 84); 88 | } 89 | .pill2 { 90 | width: 110px; 91 | height: 52px; 92 | border-radius: 25px; 93 | background: rgb(163, 104, 231); 94 | } 95 | .rectangle2 { 96 | width: 60px; 97 | height: 50px; 98 | background: rgb(137, 228, 230); 99 | } 100 | .rectangle3 { 101 | width: 50px; 102 | height: 60px; 103 | background: rgb(146, 209, 146); 104 | } 105 | 106 | .drop { 107 | border: 2px solid rgb(183, 156, 237); 108 | background: none; 109 | } 110 | -------------------------------------------------------------------------------- /06.Loops-And-Conditionals/01.For-loops/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | For Loops 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /06.Loops-And-Conditionals/02.For-in-for-of/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | For...in & For...of 8 | 9 | 10 | 11 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /06.Loops-And-Conditionals/03.While-loops/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | While Loops 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /06.Loops-And-Conditionals/04.If-else-statements/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | If Else Statements 8 | 9 | 10 | 11 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /06.Loops-And-Conditionals/05.Else-if/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Else If 8 | 9 | 10 | 11 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /06.Loops-And-Conditionals/06.The-switch-statement/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | The Switch Statement 8 | 9 | 10 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /06.Loops-And-Conditionals/07.Conditional-operator/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Conditional Operator (ternary) 8 | 9 | 10 | 11 |

12 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /06.Loops-And-Conditionals/08.Type-coercion-conversion/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Type Coercion & Conversion 8 | 9 | 10 | 11 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /06.Loops-And-Conditionals/09.Truthy-falsy/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Truthy & Falsy 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /06.Loops-And-Conditionals/10.Optional-chaining/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Optional Chaining 8 | 9 | 10 | 11 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /07.Objects-In-More-Depth/01.The-object-constructor/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | The Object Constructor 8 | 9 | 10 | 11 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /07.Objects-In-More-Depth/02.Object-constructor-functions/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Object Constructor Functions 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /07.Objects-In-More-Depth/03.Object-prototypes/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Object Prototypes 8 | 9 | 10 | 11 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /07.Objects-In-More-Depth/04.Inheriting-object-prototypes/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Inheriting Object Prototypes 8 | 9 | 10 | 11 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /07.Objects-In-More-Depth/05.Copying-object-properties/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Copying Object Properties 8 | 9 | 10 | 11 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /07.Objects-In-More-Depth/06.CSS-style-objects/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | CSS Style Objects 8 | 9 | 10 | 11 |
12 |

No Meat Burgers

13 |
14 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /07.Objects-In-More-Depth/07.Looping-with-objects/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Looping With Objects 8 | 9 | 10 | 11 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /07.Objects-In-More-Depth/08.Dynamic-objects/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Dynamic Objects 8 | 9 | 10 | 11 | 12 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /07.Objects-In-More-Depth/09.Primitive-reference-types/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Primitive & Reference Types 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /07.Objects-In-More-Depth/10.Comparing-objects/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Comparing Objects 8 | 9 | 10 | 11 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /08.Speedy-Chef-Project/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Speedy Chef! 🍕 12 | 13 | 14 | 15 |
16 |
17 |

Stats

18 |

Completed orders:

19 |

Completed pizzas:

20 |

Wasted pizzas:

21 |
22 |
23 | 24 | 25 | 26 |
27 |
28 |

Working on

29 |
30 |
31 |

Method:

32 | 33 |
34 |
35 |

Oven

36 |
37 |
38 |
39 |

Messages for the chef

40 |

41 |
42 |
43 |

Kitchen

44 | 45 |
46 |
47 |

Currently making:

48 |
49 | 50 | 51 |
52 | 53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /08.Speedy-Chef-Project/index.js: -------------------------------------------------------------------------------- 1 | const pizzas = [ 2 | { 3 | name: 'Margherita', 4 | method: 5 | '1/ Roll the dough base to the required thickness and shape. 2/ Add sauce to the base. 3/ Top with cheese.', 6 | requiredSteps: ['ROLL DOUGH', 'PIZZA SAUCE', 'CHEESE'], 7 | }, 8 | { 9 | name: 'Pepperoni', 10 | method: 11 | '1/ Roll the dough base to the required thickness and shape. 2/ Add sauce to the base. 3/ Top with cheese. 4/ Add 12 slices of pepperoni.', 12 | requiredSteps: ['ROLL DOUGH', 'PIZZA SAUCE', 'CHEESE', 'PEPPERONI'], 13 | }, 14 | { 15 | name: 'Ham and Pineapple', 16 | method: 17 | '1/ Roll the dough base to the required thickness and shape. 2/ Add sauce to the base. 3/ Top with cheese. 4/ Add 12 pieces of ham. 5/ Add 12 pieces of pineapple.', 18 | requiredSteps: ['ROLL DOUGH', 'PIZZA SAUCE', 'CHEESE', 'HAM', 'PINEAPPLE'], 19 | }, 20 | { 21 | name: 'Chicken', 22 | method: 23 | '1/ Roll the dough base to the required thickness and shape. 2/ Add sauce to the base. 3/ Top with cheese. 4/ Add 12 pieces of chicken', 24 | requiredSteps: ['ROLL DOUGH', 'PIZZA SAUCE', 'CHEESE', 'CHICKEN'], 25 | }, 26 | { 27 | name: 'Vegetarian', 28 | method: 29 | '1/ Roll the dough base to the required thickness and shape. 2/ Add sauce to the base. 3/ Top with cheese. 4/ Add handful of onions. 5/ Add handful of peppers. 6/ Add small handful of mushrooms. 7/ Add garlic.', 30 | requiredSteps: [ 31 | 'ROLL DOUGH', 32 | 'PIZZA SAUCE', 33 | 'CHEESE', 34 | 'ONIONS', 35 | 'PEPPERS', 36 | 'MUSHROOMS', 37 | 'GARLIC', 38 | ], 39 | }, 40 | ]; 41 | 42 | let orders = [ 43 | { 44 | id: 1, 45 | pizzas: [ 46 | { 47 | quantity: 1, 48 | name: 'Ham and Pineapple', 49 | }, 50 | { 51 | quantity: 2, 52 | name: 'Pepperoni', 53 | }, 54 | ], 55 | }, 56 | { 57 | id: 2, 58 | pizzas: [ 59 | { 60 | quantity: 2, 61 | name: 'Margherita', 62 | }, 63 | { 64 | quantity: 1, 65 | name: 'Pepperoni', 66 | }, 67 | ], 68 | }, 69 | { 70 | id: 3, 71 | pizzas: [ 72 | { 73 | quantity: 2, 74 | name: 'Pepperoni', 75 | }, 76 | { 77 | quantity: 1, 78 | name: 'Margherita', 79 | }, 80 | { 81 | quantity: 1, 82 | name: 'Ham and Pineapple', 83 | }, 84 | ], 85 | }, 86 | ]; 87 | 88 | const ingredients = [ 89 | 'ROLL DOUGH', 90 | 'PIZZA SAUCE', 91 | 'CHEESE', 92 | 'PEPPERONI', 93 | 'HAM', 94 | 'PINEAPPLE', 95 | 'ONIONS', 96 | 'PEPPERS', 97 | 'MUSHROOMS', 98 | 'GARLIC', 99 | 'CHICKEN', 100 | ]; 101 | -------------------------------------------------------------------------------- /08.Speedy-Chef-Project/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | display: flex; 3 | flex-direction: column; 4 | background: rgb(224, 209, 180); 5 | color: rgb(71, 71, 71); 6 | font-size: 16px; 7 | } 8 | 9 | aside { 10 | margin-left: 10px; 11 | flex: 1; 12 | padding: 10px; 13 | border-radius: 3px; 14 | overflow: hidden; 15 | } 16 | 17 | h3 { 18 | font-family: 'Dancing Script', cursive; 19 | font-size: 28px; 20 | background: rgb(255, 169, 71); 21 | padding: 5px; 22 | /* stop background being full width of section */ 23 | width: fit-content; 24 | margin: 20px auto; 25 | transform: rotate(-2deg); 26 | } 27 | 28 | /* orders ul */ 29 | ul { 30 | font-family: courier, monospace; 31 | font-size: 14px; 32 | padding: 0; 33 | border: 1px solid #b7adad; 34 | } 35 | 36 | /* orders li */ 37 | li { 38 | text-indent: 15px; 39 | border-bottom: 1px dotted rgb(159, 158, 158); 40 | padding: 5px; 41 | list-style: none; 42 | } 43 | 44 | li:last-child { 45 | border-bottom: none; 46 | } 47 | 48 | #kitchen_main { 49 | display: flex; 50 | flex-direction: column; 51 | } 52 | 53 | #working_on, 54 | #method, 55 | #stats, 56 | #oven_wrapper, 57 | #message_area, 58 | #kitchen_area, 59 | #game_controls { 60 | padding: 10px; 61 | border-radius: 3px; 62 | background: rgb(241, 241, 241); 63 | } 64 | 65 | #game_controls { 66 | grid-area: game-controls; 67 | } 68 | 69 | #working_on { 70 | grid-area: working_on; 71 | } 72 | #method { 73 | grid-area: method; 74 | } 75 | 76 | #oven_wrapper { 77 | grid-area: oven_wrapper; 78 | } 79 | 80 | #message_area { 81 | grid-area: message; 82 | } 83 | 84 | #kitchen_area { 85 | grid-area: kitchen; 86 | } 87 | 88 | main { 89 | flex: 3; 90 | display: grid; 91 | height: 100vh; 92 | grid-template-columns: 1fr 1fr 1fr; 93 | grid-template-rows: 0.5fr 3fr 1fr 3fr; 94 | grid-gap: 10px; 95 | grid-template-areas: 96 | 'game-controls game-controls game-controls' 97 | 'working_on method oven_wrapper' 98 | 'message message message' 99 | 'kitchen kitchen kitchen'; 100 | } 101 | 102 | .order_wrapper { 103 | cursor: pointer; 104 | } 105 | 106 | #stats { 107 | display: none; 108 | } 109 | 110 | #ingredients span { 111 | display: inline-block; 112 | margin: 5px 15px; 113 | background: hotpink; 114 | padding: 5px; 115 | border-radius: 3px; 116 | } 117 | 118 | .ingredient { 119 | background: rgb(224, 209, 180); 120 | } 121 | 122 | button { 123 | cursor: pointer; 124 | border: none; 125 | font-size: 18px; 126 | border-radius: 3px; 127 | padding: 10px 20px; 128 | margin: 5px 10px; 129 | } 130 | 131 | .oven_btn { 132 | background: rgb(243, 204, 78); 133 | } 134 | .complete_btn { 135 | background: rgb(152, 244, 211); 136 | } 137 | .delete_btn { 138 | background: rgb(246, 124, 124); 139 | } 140 | #pizza_name { 141 | cursor: pointer; 142 | font-size: 18px; 143 | font-style: italic; 144 | font-weight: bolder; 145 | } 146 | 147 | #message { 148 | text-align: center; 149 | font-size: 2em; 150 | font-weight: bold; 151 | min-height: 40px; 152 | } 153 | 154 | #startBtn { 155 | background: rgb(165, 217, 165); 156 | } 157 | 158 | img { 159 | max-width: 100px; 160 | } 161 | 162 | .pizzaDiv { 163 | display: inline-block; 164 | text-align: center; 165 | } 166 | 167 | .fade-in { 168 | animation: fadeIn ease 2s; 169 | } 170 | 171 | @keyframes fadeIn { 172 | 0% { 173 | opacity: 0; 174 | } 175 | 100% { 176 | opacity: 1; 177 | } 178 | } 179 | 180 | .kitchen_right { 181 | padding-top: 20px; 182 | } 183 | 184 | @media screen and (min-width: 900px) { 185 | body { 186 | flex-direction: row; 187 | } 188 | #kitchen_main { 189 | flex-direction: row; 190 | } 191 | .kitchen_left { 192 | flex: 1; 193 | } 194 | .kitchen_right { 195 | flex: 1; 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /09.Scope-Hoisting-Closures/01.Introduction-to-scope/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Introduction To Scope 8 | 9 | 10 | 11 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /09.Scope-Hoisting-Closures/02.Nesting-scope/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Nesting Scope 8 | 9 | 10 | 11 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /09.Scope-Hoisting-Closures/03.Block-function-scope/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Block & Function Scope 8 | 9 | 10 | 11 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /09.Scope-Hoisting-Closures/04.Hoisting/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Hoisting 8 | 9 | 10 | 11 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /09.Scope-Hoisting-Closures/05.Temporal-dead-zone/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Temporal Dead Zone 8 | 9 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /09.Scope-Hoisting-Closures/06.Closures/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Closures 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /10.Async-Javascript/01.A-little-bit-of-background/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | A Little Bit Of Background 8 | 9 | 10 | 11 | 12 |

13 | 14 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /10.Async-Javascript/02.Callback-functions/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Callback Functions 8 | 9 | 10 | 11 | 12 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /10.Async-Javascript/03.Promises/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Promises 8 | 9 | 10 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /10.Async-Javascript/04.The-promise-constructor/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | The Promise Constructor 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /10.Async-Javascript/05.Handling-multiple-promises/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Handling Multiple Promises 8 | 9 | 10 | 11 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /10.Async-Javascript/06.Async-await/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Async / Await 8 | 9 | 10 | 11 | 12 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /10.Async-Javascript/07.Handling-multiple-awaits/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Handling Multiple Awaits 8 | 9 | 10 | 11 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /10.Async-Javascript/08.Error-handling/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Error Handling 8 | 9 | 10 | 11 | 12 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /11.More-Practice/1.Leaving-so-soon/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Leaving So Soon? 9 | 10 | 11 |

Leaving so soon?

12 | 13 |
14 |
15 | 16 |

Leaving so soon?

17 |

Drop your email to get a special discount code:

18 |
19 | 20 | 21 |
22 |
23 |
24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /11.More-Practice/1.Leaving-so-soon/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/11.More-Practice/1.Leaving-so-soon/script.js -------------------------------------------------------------------------------- /11.More-Practice/1.Leaving-so-soon/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | min-height: 100vh; 3 | text-align: center; 4 | background: white; 5 | } 6 | 7 | #exit-popup { 8 | background-color: rgba(0, 0, 0, 0.7); 9 | position: absolute; 10 | top: 0; 11 | right: 0; 12 | bottom: 0; 13 | left: 0; 14 | display: none; 15 | justify-content: center; 16 | align-items: center; 17 | animation: fadeIn 1s; 18 | } 19 | 20 | .exit-content { 21 | background: white; 22 | border-radius: 1rem; 23 | min-width: 60vw; 24 | padding: 1rem 1rem 2rem 1rem; 25 | } 26 | 27 | .close { 28 | display: flex; 29 | justify-content: flex-end; 30 | cursor: pointer; 31 | color: rgb(224, 91, 91); 32 | } 33 | 34 | @keyframes fadeIn { 35 | 0% { 36 | opacity: 0; 37 | } 38 | 100% { 39 | opacity: 1; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /11.More-Practice/2.Image carousel/carousel/carousel.css: -------------------------------------------------------------------------------- 1 | #carousel { 2 | max-width: 1000px; 3 | margin: 0 auto; 4 | } 5 | 6 | .carousel:hover { 7 | cursor: pointer; 8 | } 9 | 10 | .large { 11 | animation: fadeIn 1s; 12 | width: 100%; 13 | margin-bottom: 10px; 14 | } 15 | 16 | .small { 17 | width: 20%; 18 | } 19 | 20 | .small:hover { 21 | opacity: 0.95; 22 | } 23 | 24 | @keyframes fadeIn { 25 | 0% { 26 | opacity: 0.8; 27 | } 28 | 100% { 29 | opacity: 1; 30 | } 31 | } 32 | 33 | #smallImageWrapper { 34 | display: flex; 35 | justify-content: space-between; 36 | align-items: center; 37 | } 38 | 39 | span { 40 | color: rgb(57, 57, 57); 41 | font-size: 2rem; 42 | cursor: pointer; 43 | } 44 | -------------------------------------------------------------------------------- /11.More-Practice/2.Image carousel/carousel/carousel.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/11.More-Practice/2.Image carousel/carousel/carousel.js -------------------------------------------------------------------------------- /11.More-Practice/2.Image carousel/carousel/images/beach.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/11.More-Practice/2.Image carousel/carousel/images/beach.jpg -------------------------------------------------------------------------------- /11.More-Practice/2.Image carousel/carousel/images/elephants.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/11.More-Practice/2.Image carousel/carousel/images/elephants.jpg -------------------------------------------------------------------------------- /11.More-Practice/2.Image carousel/carousel/images/grass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/11.More-Practice/2.Image carousel/carousel/images/grass.jpg -------------------------------------------------------------------------------- /11.More-Practice/2.Image carousel/carousel/images/lake.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/11.More-Practice/2.Image carousel/carousel/images/lake.jpg -------------------------------------------------------------------------------- /11.More-Practice/2.Image carousel/carousel/images/town.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisdixon161/modern-javascript-starter-files/8618321b4bff3b2bd8ab87889c53a6f1f9389fbc/11.More-Practice/2.Image carousel/carousel/images/town.jpg -------------------------------------------------------------------------------- /11.More-Practice/2.Image carousel/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Image Carousel 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | --------------------------------------------------------------------------------