RandomQuoteMachine
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 - 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");
});
Developer | Daniel |
Username | twdaniel |
Uploaded | October 23, 2022 |
Rating | 3 |
Size | 2,508 Kb |
Views | 8,096 |
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 |
Test getlocation | 1,758 Kb |
Tribute | 2,052 Kb |
A Pen by daniel | 2,678 Kb |
PracticeQuote | 2,606 Kb |
ShowTLW | 3,314 Kb |
A wiki viewer | 2,637 Kb |
Portfolio | 3,399 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 |
React Template | Isac | 1,241 Kb |
Heartbeat | Apetrov | 2,079 Kb |
Reviews and Ratings Star | Zbnmstry | 1,591 Kb |
About Us | Francescaedits | 1,902 Kb |
Sidebar Thing | Jonambas | 2,779 Kb |
Kudos Please | TimPietrusky | 6,624 Kb |
Tic Tac Toe | Volv | 4,862 Kb |
Twitch API | Coderpilot | 3,412 Kb |
Toggle menu | Seyedi | 2,279 Kb |
A vuejs widget | Chrgl86 | 2,869 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!