Random Quote Machine
How do I make an random quote machine?
What is a random quote machine? How do you make a random quote machine? This script and codes were developed by Mfcastro on 20 January 2023, Friday.
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'>
</head>
<body> <div class="container"> <div class=""> <button class="btn btn-default" id="quote">Generate Quote</button> </div> <div class="jumbotron" id="quoteMachine"> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjs/2.4.1/math.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Random Quote Machine - Script Codes JS Codes
$(document).ready(function(){ function getRandomArbitrary(min, max) { return Math.random() * (max - min) + min;
}
var rando = getRandomArbitrary(0, 10);
$("#quote").click(function() { randQ(); function randQ() { if (rando >= 9) { return $("#quoteMachine").replaceWith("<div class ='jumbotron' id='quoteMachine'><blockquote><h1>Life is what you make it! </h1><footer>Marco</footer></blockquote></div>"); } else if (rando >= 8) { return $("#quoteMachine").replaceWith("<div class ='jumbotron' id='quoteMachine'><blockquote><h1>It is what it is! </h1><footer>Marco</footer></blockquote></div>"); } else if (rando >= 7) { return $("#quoteMachine").replaceWith("<div class ='jumbotron' id='quoteMachine'><blockquote><h1>Why not you! </h1><footer>Marco</footer></blockquote></div>"); } else if (rando >= 6) { return $("#quoteMachine").replaceWith("<div class ='jumbotron' id='quoteMachine'><blockquote><h1>Gosh am I tired! </h1><footer>Marco</footer></blockquote></div>"); } else if (rando >= 5) { return $("#quoteMachine").replaceWith("<div class ='jumbotron' id='quoteMachine'><blockquote><h1>Look at you programming and stuff! </h1><footer>Marco</footer></blockquote></div>"); } else if (rando >= 4) { return $("#quoteMachine").replaceWith("<div class ='jumbotron' id='quoteMachine'><blockquote><h1>wowza! </h1><footer>Marco</footer></blockquote></div>"); } else if (rando >= 3) { return $("#quoteMachine").replaceWith("<div class ='jumbotron' id='quoteMachine'><blockquote><h1>I love you Emily! </h1><footer>Marco</footer></blockquote></div>"); } else if (rando >= 2) { return $("#quoteMachine").replaceWith("<div class ='jumbotron' id='quoteMachine'><blockquote><h1>I have a headache! </h1><footer>Marco</footer></blockquote></div>"); } else if (rando >= 1) { return $("#quoteMachine").replaceWith("<div class ='jumbotron' id='quoteMachine'><blockquote><h1>I hate this place! </h1><footer>Marco</footer></blockquote></div>"); } else { return $("#quoteMachine").replaceWith("<div class ='jumbotron' id='quoteMachine'><blockquote><h1>All done! </h1><footer>Marco</footer></blockquote></div>"); } }
});
});

Developer | Mfcastro |
Username | marcocastro |
Uploaded | January 20, 2023 |
Rating | 3 |
Size | 1,924 Kb |
Views | 4,046 |
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 |
Dashboard | 3,640 Kb |
Learn Animation | 3,142 Kb |
V2 | 2,668 Kb |
Ng-if | 1,511 Kb |
Workbench | 2,388 Kb |
A Pen by Mfcastro | 2,738 Kb |
RWD- Mostly Fluid Layout Pattern | 2,312 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 |
Count checked checkboxes with jQuery | Mestika | 2,343 Kb |
Comparison of Roboto Draft vs Roboto | Jxnblk | 2,880 Kb |
Scoreboard.js basic usage | Tbleckert | 1,733 Kb |
Cant get enough icecream in pure css3 | Melawire | 4,322 Kb |
CSS Parent Selector | Tomhodgins | 2,143 Kb |
Faces SVG animation | ScavengerFrontend | 2,957 Kb |
Donut Chart example - MorrisJS | Capelo | 2,385 Kb |
Kudos Please | TimPietrusky | 6,624 Kb |
A Pen by Jay | Jaycode | 3,784 Kb |
Base-Style | Daniel_gooss | 2,614 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!