Random Quote Machine

2,611 Kb

How do I make an random quote machine?

Random Quote Machine for FreeCodeCamp Zipline: Build a Random Quote Machine.. What is a random quote machine? How do you make a random quote machine? This script and codes were developed by Joo Vctor De Oliveira Santos on 27 August 2022, Saturday.

Random Quote Machine Previews

Random Quote Machine - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Random Quote Machine</title> <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
<body> <center> <div class="container"> <div class="page-header"> <h1 style="font-size:64px">Random Quotes</h1> </div> <h3>Random Quote for random moments, forever...</h3> </br>
<button type="button" class="btn btn-primary btn-lg" id="btnRand">Randomize! <span class="glyphicon glyphicon-refresh" aria-hidden="true"></span></button> </br> </br> <div class="panel panel-default" id = "quotePanel"> <div class="panel-heading"> <h3 class="panel-title quoteAuthor" id="quoteAuthor">Quote author</h3> </div> <div class="panel-body" id="quoteText" style="font-size:24px"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec odio felis, sodales eget posuere at, fermentum eget enim. Ut eu tincidunt massa. </div> <div class="panel-footer"> <a href="#" id="link"> <button type="button" class="btn btn-default glyphicon glyphicon-share" onClick="tweetIt();"></button> </a> </div> </div> </div>
</center> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script> <script src="js/index.js"></script>

Random Quote Machine - Script Codes CSS Codes

.quoteAuthor{ font-size: 35px;
body{ background-color:white;

Random Quote Machine - Script Codes JS Codes

var quotes = [];
$('#btnRand').on('click', function() { randomize();
function randomize() {
$('#quotePanel').removeClass("hidden"); $('#quotePanel').addClass("animated bounce"); quote = quotes[Math.floor(Math.random() * (quotes.length + 1))]; $('#quoteText').html(quote[1]); $('#quoteAuthor').html("<i>" + quote[0] + "</i>");
function populate() { quotes[0] = ["Queen Victoria", "Everybody grows but me."]; quotes[1] = ["Mark Twain", "I can live for two months on a good compliment."]; quotes[2] = ["Ralph Waldo Emerson", "Children are all foreigners."]; quotes[3] = ["Adlai E. Stevenson", "A hungry man is not a free man."]; quotes[4] = ["Laurence J. Peter", "Lead, follow, or get out of the way."];
function tweetIt () { var phrase = '"' + quote[1] + '"' + " - " + quote[0]; var tweetUrl = 'https://twitter.com/share?text=' + encodeURIComponent(phrase)+'&url=null'; window.open(tweetUrl, "_blank");
Random Quote Machine - Script Codes
Random Quote Machine - Script Codes
Home Page Home
Developer Joo Vctor De Oliveira Santos
Username jvhti
Uploaded August 27, 2022
Rating 3
Size 2,611 Kb
Views 42,483
Do you need developer help for Random Quote Machine?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Joo Vctor De Oliveira Santos (jvhti) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!