Random Quote Generator
How do I make an random quote generator?
What is a random quote generator? How do you make a random quote generator? This script and codes were developed by Jimmy Lin on 11 December 2022, Sunday.
Random Quote Generator - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Random Quote Generator</title> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
<div class="container-fluid"> <div> <div class="text-center"> <h1> Random Quote Generator</h1>
<br/> <button class="btn btn-default" type="submit" id="newQuote"> New Quote </button> <a href="a" class="btn btn-default" id="tweet">Tweet Out</a> </div> <br/> <br/>
<div class="quotes text-center"> <span class="quote"></span> <br/> <span class="author"></span> </div> </div>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Random Quote Generator - Script Codes CSS Codes
body { font-family: Times New Roman;
}
h1 { font-family: Lobster;
}
.quotes { border-color: grey; border-radius:5px; border-style: solid; margin-right:auto; margin-left:auto; margin-top:20px; width:33%; padding:20px; height:auto;
}
.quote{ font-size:30px;
}
.author{ font-size:20px; font-style:italic; padding-left:50px;
}
Random Quote Generator - Script Codes JS Codes
$(document).ready(function(){ var randomQuote; var randomAuthor; var randomNum; var author; getQuote(); function getQuote(){ var quotes = ["We're not gonna die. We can't die, Bendis. You know why? Because we are so...very...pretty. We are just too pretty for God to let us die.", "Ten percent of nuthin' is...let me do the math here...nuthin' into nuthin'...carry the nuthin'...", "No power in the 'verse can stop me", "I'm a leaf on the wind- watch how I soar", "You know, with the exception of one deadly and unpredictable midget, this girl is the smallest cargo I've ever had to transport. Yet by far the most troublesome. Does that seem right to you?", "Can't stop the signal, Mal. Everything goes somewhere, and I go everywhere.", "Shiny. Let's be bad guys.", "Time for some thrilling heroics.", "When you can't run, you crawl, and when you can't crawl - when you can't do that... You find someone to carry you"] var author = ["Malcom Reynolds", "Jayne", "River", "Wash", "Early", "Mr. Universe", "Jayne", "Jayne", "Tracey/Zoey"] randomNum = Math.floor((Math.random()*quotes.length)); randomQuote = quotes[randomNum]; randomAuthor = author[randomNum]; $(".quote").text( "''"+ randomQuote+"''"); $(".author").text("- " +randomAuthor); } $("#newQuote").on("click", function(){ getQuote(); }); $("#tweet").on("click", function() { window.open("https:twitter.com/intent/tweet?text=" +randomQuote+ " " + randomAuthor); });
});
Developer | Jimmy Lin |
Username | odylic |
Uploaded | December 11, 2022 |
Rating | 3 |
Size | 2,674 Kb |
Views | 10,120 |
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 |
Calculator | 2,544 Kb |
Tic Tac Toe Game | 2,701 Kb |
Portfolio Trial 1 | 3,730 Kb |
Firefly tribute | 2,476 Kb |
Simon Game | 3,485 Kb |
Twitch JSON API | 2,556 Kb |
Pomodoro Clock | 2,384 Kb |
Mark Down Previewer | 3,062 Kb |
RPG Style Text Dialogue | 2,635 Kb |
Local Weather | 2,560 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 |
Animated Slide Hamburger Mobile Menu | BJack | 2,247 Kb |
Android Play Store With Slick Carousel | -J0hn- | 4,982 Kb |
Codero Sitemap | S1m0ne | 28,169 Kb |
Mini Profile | Frytyler | 3,828 Kb |
Factorial | KeithleySLHS | 1,158 Kb |
Opening Reveal Modal On Document Ready | Winghouchan | 1,787 Kb |
RRC wrapSwitch | Pshrmn | 2,922 Kb |
Canvas Orbital Trails v2 | Jackrugile | 3,421 Kb |
CSS Social Media Icon | TychoBlender | 3,871 Kb |
SVG email test v2.0 | M_J_Robbins | 2,090 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!