RandomQuoteMachine

Developer
Size
2,508 Kb
Views
8,096

How do I make an randomquotemachine?

What is a randomquotemachine? How do you make a randomquotemachine? This script and codes were developed by Daniel on 23 October 2022, Sunday.

RandomQuoteMachine Previews

RandomQuoteMachine - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>randomQuoteMachine</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 rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" >
<div class="container"> <div class="row"> <div class="col-md-12"> <blockquote class="block"> <h2 class="text-center"><i class="fa fa-quote-left fa-lg" aria-hidden="true"></i>Random Qoute Generator</h2><br> <p class="quote" id="quote-text">quote text</p><br> <footer id="attribution" class="pull-right">author</footer> </blockquote> <div class="col-md-12 text-center"> <button id="getQuote" class="btn btn-default">Generate Quote</button> <a class="twitter-share-button" href="https://twitter.com/intent/tweet" data-size="large" target="_blank"><button id="tweet" class="btn btn-default"><i class="fa fa-twitter fa-lg"></i> twitter </button></a> </div> <div class="col-xs-12 text-center"> <p><i class="fa fa-copyright"></i>2016 twdaniel, all right reserved.</p> </div> </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>

RandomQuoteMachine - Script Codes CSS Codes

body { background-color : Plum; font-family:sans-serif;
}
blockquote { background-color : GhostWhite; padding: 10px 40px 20px 40px; margin: 50px 20px 50px; font-family: cursive; border: solid 2px lightgray; border-radius: 15px;
}

RandomQuoteMachine - Script Codes JS Codes

//API to get quote data in json type
url = "https://crossorigin.me/https://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&lang=en&jsonp=?";
//function to process quote data
var getQuote = function(data) { //set quotetext to id=quote-text $("#quote-text").text(data.quoteText); //set quoteauthor to id= attribution $("#attribution").text(data.quoteAuthor); //check author val is valid or not if (data.quoteAuthor === "") { data.quoteAuthor = "Unknown"; }
var twquote = "https://twitter.com/intent/tweet?text=" + data.quoteText + "..." + data.quoteAuthor; // API to quote data to twitter $(".twitter-share-button").attr("href", twquote); //swap twitter button's href
};
$(document).ready(function () { //initial quote data in webpage $.getJSON(url, getQuote, "jsonp");
});
//when click generate quote button
$("#getQuote").click(function () { $.getJSON(url, getQuote, "jsonp");
});
RandomQuoteMachine - Script Codes
RandomQuoteMachine - Script Codes
Home Page Home
Developer Daniel
Username twdaniel
Uploaded October 23, 2022
Rating 3
Size 2,508 Kb
Views 8,096
Do you need developer help for RandomQuoteMachine?

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!

Daniel (twdaniel) Script Codes
Name
Test getlocation
Tribute
A Pen by daniel
PracticeQuote
ShowTLW
A wiki viewer
Portfolio
Create amazing captions 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!