Random Quote Machine

Developer
Size
2,411 Kb
Views
10,120

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 Codoer on 07 December 2022, Wednesday.

Random Quote Machine Previews

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='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container-fluid " > <div class="row text-center general"> <div class="quote-area" id="quo"> <q class="quote-text">quote text</q> <h4 class="quote-author">author</h4>
<a href="#" target="_blank" class="btn btn-info pull-left" id="quote-tweet"></i> Tweet</a> <a class="btn btn-info pull-right" href="#" id="refresh" onclick="getQuote()">New Quote</a> </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 Machine - Script Codes CSS Codes

body { background: url(http://www.wallpaperdx.com/images/sea-coast-and-lighthouse-sky-full-hd-nature-wallpaper.jpg)
no-repeat center center fixed; color: black;
background-size: cover;
}
.quote-area{
width: 750px;
/*background-color: #e5f4f3;*/
/*background-color:rgba(0,25,0,0.2);*/
margin-top: 130px;
margin-left: 90px;
padding-top: 10px;
padding-left: 30px;
padding-right: 30px;
padding-bottom: 60px;
border-radius: 30px;
color:white;
}
.quote-text{ font-size: 30px;
}
.quote-author{ text-align: right; padding-right:30px; font-style: italic; font-weight: 200;
}

Random Quote Machine - Script Codes JS Codes

function changeColor(){ var random = function() { return Math.floor(Math.random() * 256); } var color="rgba("+random()+","+random()+","+random()+",0.3)"; $(".quote-area").css("background-color", color);
}
function getQuote(){
$.getJSON("https://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=jsonp&lang=en&jsonp=?", function(data) { $(".quote-text").text(data.quoteText); if(data.quoteAuthor===""){$(".quote-author").text("Unknown"); $("#quote-tweet").attr("href", "https://twitter.com/share?text="+"\""+data.quoteText+"\""+" Author: Unkown."); } else { $(".quote-author").text(data.quoteAuthor);
$("#quote-tweet").attr("href", "https://twitter.com/share?text="+"\""+data.quoteText+"\""+" Author: "+data.quoteAuthor+".");
}
changeColor();
})
}
getQuote();
Random Quote Machine - Script Codes
Random Quote Machine - Script Codes
Home Page Home
Developer Codoer
Username c0d0er
Uploaded December 07, 2022
Rating 3
Size 2,411 Kb
Views 10,120
Do you need developer help for Random Quote Machine?

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!

Codoer (c0d0er) Script Codes
Create amazing sales emails with AI!

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!