We're going to use jQuery to make a webpage that displays a random quote.
- Fork and clone this repository
- Run
npm install
to install dependenciesnpm start
- start the BrowserSync servernpm run lint:css
- lint CSSnpm run lint:js
- lint JS
- Setup your HTML page, and don't forget to include links to the CSS and JS files.
- Be creative! Both in your choice of quotes and styling. Think about all of those different CSS properties.
- As a bonus, add a form field and allow people to include their own quotes in your random generator.
IMDB and Goodreads are good sources for quotes. Look up a movie, an author or book that you like and see what they have. Feel free to google around for any other collection of quotes you feel inspired to use.
- Using jQuery, create a webpage that generates a random quote and display it on the page when a button is clicked
- Note that you'll want to store quotes in an array, and use
Math.random()
andMath.floor()
to generate random array indicies. - See MDN for
Math.random
examples: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
- Note that you'll want to store quotes in an array, and use
- Every time the button is clicked, clear the old quote and replace it with a new random quote.
- If you've already encountered AJAX or fetch, alter this assignment to use a Quote API to pull quotes
- All content is licensed under a CC-BY-NC-SA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].