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,048 |
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 |
Learn Animation | 3,142 Kb |
A Pen by Mfcastro | 2,738 Kb |
Ng-if | 1,511 Kb |
Dashboard | 3,640 Kb |
V2 | 2,668 Kb |
Random Quote Machine | 1,924 Kb |
Workbench | 2,388 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 |
FreeCodeCamp - Simon Game | Ivhed | 8,481 Kb |
Playing with transition timing | Mattgrosswork | 1,993 Kb |
SVG Animation | Thepheer | 4,793 Kb |
Sort the Knowlege | Eprouver | 3,915 Kb |
Highbrow Basic HTML Lesson 8 | Kimlarocca | 2,094 Kb |
Lazy Load for Background Images | The_ruther4d | 2,977 Kb |
Mobile Sub Menu Concept | Berdejitendra | 2,790 Kb |
Weather App | OmranAbazid | 2,596 Kb |
Cool audio | Bigliam | 1,868 Kb |
Product item | Mymahesh11 | 2,256 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!