Random Quote Machine
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 - 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">
</head>
<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>
</body>
</html>
Random Quote Machine - Script Codes CSS Codes
.quoteAuthor{ font-size: 35px;
}
body{ background-color:white;
}
Random Quote Machine - Script Codes JS Codes
var quotes = [];
populate();
$('#quotePanel').addClass("hidden");
$('#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");
}
Developer | Joo Vctor De Oliveira Santos |
Username | jvhti |
Uploaded | August 27, 2022 |
Rating | 3 |
Size | 2,611 Kb |
Views | 42,504 |
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!
Name | Size |
Testimonial Gallery | 3,887 Kb |
Markdown Previewer | 11,087 Kb |
Tic Tac Toe Game | 3,932 Kb |
Price Table | 2,460 Kb |
Twitch JSON API | 2,808 Kb |
Love Letter | 3,237 Kb |
Wikipedia Viewer | 2,624 Kb |
Personal Portfolio | 3,604 Kb |
Youtube Random Video With Cover Image | 2,600 Kb |
Portfolio Flat | 3,642 Kb |
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!
Name | Username | Size |
JS Beispiel getElementsByClassName 3 | HSZG-Frontend-Kurs | 1,988 Kb |
HTML5 Breakout | Jaysalvat | 4,873 Kb |
Material design buttons | Fischaela | 4,381 Kb |
Isometric css island | Xaddict | 2,950 Kb |
Use the Twitchtv JSON API | Roksanaop | 3,561 Kb |
Full page table inside the grid | Twikito | 1,864 Kb |
Fullscreen audio play button | 72 | 2,148 Kb |
A Pen by boilzzz | Boilzzz | 2,761 Kb |
Google Fonts Sass Mixin | HugoGiraudel | 4,237 Kb |
A Different Type of Gallery | DonPage | 2,950 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!