Tonight's training involves taking over imgur.com with javascript! You will need to write a function for each of the following requests below. Once you have successfully tested the function in the browser, copy and save your code in solutions.js
with an appropriate functionName.
- Create a function that changes the navbar to a different color.
- Add a new
<h1>
to the top of the page that says<h1>This page is now under *YOUR NAME*'s control!'</h1>
. - Remove half of the images (from the DOM) and hide half of the remainder (CSS display property).
- Create a function that prompts the user to type "please" after clicking an image in order to see it larger.
Hint: You will need to use event.preventDefault();
- On the Home page, change random image links to point to a YouTube video instead of their intended destination.
- On the Details page, create a function that will randomly click either "upvote" or "downvote".
- On the Details page, hide all comments under the image that are below a given points threshold.
Example: Hide all comments that are < 2,000 points
All content is licensed under a CCBYNCSA 4.0 license. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co. or alternative licensing, please contact legal@ga.co.