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 Michael on 26 October 2022, Wednesday.
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://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <body> <div class= "container fluid" id=""> <div class= "jumbotron"> <blockquote class="blockquote"> <p class="m-b-0" id="quote">Click the new quote button to change quotes </br> - Author.</p> </blockquote> </div> <button type='button' class="btn btn-primary btn-lg" id="btn">New Quote</button> </div> <div class="twitter button-big social"> <i class="fa fa-twitter"></i>
</div>
<div class="facebook button-big social"> <i class="fa fa-facebook"></i>
</div>
</body> <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Random Quote generator - Script Codes CSS Codes
@import url("//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css");
/* div styles for presentation */
.social
{ border-right: 5em; margin-bottom: 0.2em; margin-left: 0.2; margin-right: 5em; background-color: #ecf0f1; float: right;
}
/* General rule */
.button-big
{ font-size: 2.5em; width: 4em; text-align:center; padding: 0.2em 0em 0.2em 0em;
}
/* Twitter class and animation */
.twitter
{ color: #0096ff; border: 1px solid #0096ff;
}
.twitter:hover
{ animation: twitterAnim 0.4s normal forwards linear; -webkit-animation: twitterAnim 0.4s normal forwards linear;
}
@keyframes twitterAnim { 50% { background-color: #0096ff; } 100% { background-color: #0096ff; border: 1px solid #0096ff; color: #fff; }
}
@-webkit-keyframes twitterAnim { 50% { background-color: #0096ff; } 100% { background-color: #0096ff; border: 1px solid #0096ff; color: #fff; }
}
/* Facebook class and animation */
.facebook
{ color: #3B5998; border: 1px solid #3B5998;
}
.facebook:hover
{ animation: facebookAnim 0.4s normal forwards linear; -webkit-animation: facebookAnim 0.4s normal forwards linear;
}
@keyframes facebookAnim { 50% { background-color: #3B5998; } 100% { background-color: #3B5998; border: 1px solid #3B5998; color: #fff; }
}
@-webkit-keyframes facebookAnim { 50% { background-color: #3B5998; } 100% { background-color: #3B5998; border: 1px solid #3B5998; color: #fff; }
}
/* Links */
a
{ color: #9b59b6; text-decoration: none;
}
Random Quote generator - Script Codes JS Codes
$(document).ready(function(){ $('button').on('click',function(){ $.getJSON("https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(a) { $("#quote").html(a[0].content + "<p>— " + a[0].title + "</p>") $.ajaxSetup({ cache: false }) function randomColor() { var c = "#"; for (var i = 0; i < 6; i++) { c += (Math.random() * 16 | 0).toString(16); } return c; } //function returns random hexadecimals that represent colors document.getElementById("quote").style.color = randomColor(); document.getElementById("btn").style.backgroundColor = randomColor(); });//get a new json everytime. });// on-click function .
}); // getting the document ready .
Developer | Michael |
Username | buffmike |
Uploaded | October 26, 2022 |
Rating | 3 |
Size | 2,637 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 |
A Pen by michael | 14,456 Kb |
Prince Legend | 2,626 Kb |
React | 1,300 Kb |
Portfolio. | 3,523 Kb |
Weather App | 3,700 Kb |
Wiki search | 2,124 Kb |
Vue1 | 1,964 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 |
Canvas Fireworks | Jackrugile | 6,200 Kb |
Simple Login Form Template | Banunn | 3,571 Kb |
NeeilTimer | Neeilan | 2,836 Kb |
Ghost Buttons with CSS3 | Mithicher | 2,509 Kb |
A Pen by boilzzz | Boilzzz | 2,761 Kb |
Touch Carousel - last, no gaps. | Berkin | 4,332 Kb |
Vue.js Lazy Loading | Kjbrum | 3,620 Kb |
Mobile first social buttons with no iframe | Alistairtweedie | 3,158 Kb |
Importable Clearfix | Corysimmons | 1,411 Kb |
Pruebas de d3.js | Juanmanuelcarnerero | 2,485 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!