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

Ampers steffany #35

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Ampers steffany #35

wants to merge 4 commits into from

Conversation

steffnay
Copy link

Digital Clock

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does jQuery give you that JavaScript doesn't? The ability to update the page's html.
Describe what the following jQuery selector would give you: $('#list') It would return the element with the id 'list
What are three major things you learned about JavaScript this week? I learned one way to debug it in the browser, I learned how to make it responsive using JQuery, and I learned some basic syntax.

index.js Outdated

$('#clock').html(`The time is...<h1> ${hours}:${minutes}:${seconds} </h1>`);
};

Choose a reason for hiding this comment

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

A couple of things:

  1. You should put the setInterval call inside of $(document).ready(() => { ... });
  2. You have jQuery loading after your index.js file.

It works because by the time setInterval fires jQuery and the HTML are loaded, but wouldn't be guaranteed in a deployed app.

index.html Outdated
</body>
</html>

<script src="index.js"></script>
<script src="jquery-3.3.1.js" type="text/javascript"></script>

Choose a reason for hiding this comment

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

Should be put above the tag loading index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants