Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CYF-ITP-South Africa | Simphiwe Mabuya | Module-Data-Groups | Sprint-3-Quote-Generator #279

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
725e4cd
Started by accessing elements: quote, author and the button through t…
Simphiwe-Mabuya Jan 6, 2025
7abdc42
Created an event listener to listen for a "click" when the button is …
Simphiwe-Mabuya Jan 6, 2025
ebb7358
Declared a variable randomQuotes so to save both the quote and author…
Simphiwe-Mabuya Jan 6, 2025
efc2144
Declared a quote and author variables to separately save the values f…
Simphiwe-Mabuya Jan 6, 2025
f04d7d2
Updated my variables on line 30 and 31 ..then wrote two lines for dis…
Simphiwe-Mabuya Jan 6, 2025
3b5e5ff
Renamed the title of my index.html file
Simphiwe-Mabuya Jan 6, 2025
fdbd133
Fixed line 33 and 44 so to display the quote and the author
Simphiwe-Mabuya Jan 6, 2025
7ef21e5
Implemented an onload function so to match test expectations
Simphiwe-Mabuya Jan 6, 2025
5cebbc0
Removed the script tag from the head and placed it above the body clo…
Simphiwe-Mabuya Jan 6, 2025
d4b1150
Updated my testing library and automatically adjusted the package.jas…
Simphiwe-Mabuya Jan 6, 2025
83a725f
Edited my code on line 36 by removing the unnecessary delay
Simphiwe-Mabuya Jan 7, 2025
5f1a055
Edited my test by removing the line 29 because it was targeting index…
Simphiwe-Mabuya Jan 7, 2025
1d60750
Placed the script tag on top of the closing body tag and removed the …
Simphiwe-Mabuya Jan 7, 2025
a3ab094
Refined my event listener function to trigger and display a random quote
Simphiwe-Mabuya Jan 7, 2025
fa52327
Edited my HTML title to be uppercase consistent and added the defer a…
Simphiwe-Mabuya Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sprint-3/quote-generator/index.html

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In your title make sure you are consistent with your case (some words starting with uppercse some with lowercase).

You can also make use of the defer attribute in your script tag

https://www.w3schools.com/tags/att_script_defer.asp

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Title here</title>
<script defer src="quotes.js"></script>
<title>Quote Generator app</title>
</head>
<body>
<h1>hello there</h1>
<p id="quote"></p>
<p id="author"></p>
<button type="button" id="new-quote">New quote</button>
<script src="quotes.js"></script>
</body>
</html>
Loading