FCC Random quote machine

Developer
Size
2,085 Kb
Views
8,096

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 Previews

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");
}
FCC Random quote machine - Script Codes
FCC Random quote machine - Script Codes
Home Page Home
Developer Victoria
Username Enieste
Uploaded December 02, 2022
Rating 3
Size 2,085 Kb
Views 8,096
Do you need developer help for FCC 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!

Victoria (Enieste) Script Codes
Create amazing art & images 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!