FCC Random quote machine
How do I make an fcc random quote machine?
What is a fcc random quote machine? How do you make a fcc random quote machine? This script and codes were developed by Victoria on 02 December 2022, Friday.
FCC Random quote machine - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>FCC Random quote machine</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="quote-block"> <div class="quote-text"></div> <div class="author"></div> <button class="tweet-button" onClick="tweetQuote()">Tweet</button> <button class="quote-button">New quote</button>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
FCC Random quote machine - Script Codes CSS Codes
.quote-block {
}
.quote-button {
}
FCC Random quote machine - Script Codes JS Codes
const getQuote = function () { $.ajax({ url: 'https://andruxnet-random-famous-quotes.p.mashape.com/?cat=famous', type: 'post', headers: { 'X-Mashape-Key': 'OivH71yd3tmshl9YKzFH7BTzBVRQp1RaKLajsnafgL2aPsfP9V', 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json' }, dataType: 'json', success: function (data) { var quote = data.quote; var author = data.author; $(".quote-text").empty().append( quote); $(".author").empty().append( author); } });
};
$(getQuote());
$(".quote-button").click(getQuote);
function tweetQuote() { const part = encodeURIComponent($('.quote-text').text() + '\n' + $('.author').text());
window.open("https://twitter.com/intent/tweet?text=" + part, "_blank", "toolbar=yes, scrollbars=yes, resizable=yes, top=500, left=500, width=400, height=400");
}
Developer | Victoria |
Username | Enieste |
Uploaded | December 02, 2022 |
Rating | 3 |
Size | 2,085 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 |
FCC Pomodoro | 3,618 Kb |
FCC Local Weather | 2,076 Kb |
Profile | 3,970 Kb |
FCC JS Calculator | 4,996 Kb |
FCC Reacted Markdown | 2,685 Kb |
React konva | 4,721 Kb |
FCC Tic Tac Toe | 5,602 Kb |
FCC Tribute page | 3,327 Kb |
Cube calc | 3,851 Kb |
FCC Recipe Box | 7,585 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 |
12 DAYS OF XMAS | Proto78 | 2,313 Kb |
Subtle site navigation with description | Necks | 3,206 Kb |
RSW | JordanC | 3,726 Kb |
RollOver Effect 2 | Lmack90 | 2,162 Kb |
Apex Calculator | Michaelwnelson | 2,370 Kb |
Weird glowy CSS3 game | Toneworm | 3,684 Kb |
Cut and Paste Roll Link | BottomlineInteractive | 2,546 Kb |
Vue.js | Thommyboy02 | 1,506 Kb |
Velocity.js custom stagger | Tommiehansen | 4,805 Kb |
Preloader | Rikki_Sixx | 2,815 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!