Random Quote Machine Exercise

Size
2,281 Kb
Views
8,096

How do I make an random quote machine exercise?

What is a random quote machine exercise? How do you make a random quote machine exercise? This script and codes were developed by Nathaniel Horwitz-Willis on 06 December 2022, Tuesday.

Random Quote Machine Exercise Previews

Random Quote Machine Exercise - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Random Quote Machine Exercise</title>
</head>
<body> <html lang="en">
<head> <meta charset="UTF-8"> <title>Random Quote Machine</title> <meta name="description" content="Random Quote Generator"> <meta name="author" content="Aung Myo Kyaw"> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.min.css"> <script type="text/javascript" src="js/index.js"></script> <link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body> <div class="container"> <h1><a href="">Random Quote Machine</a></h1> <p id="quote"></p> <p id="author"></p> <input type="button" id="new" value="New Quote"> <input type="button" id="tweet" value="Tweet"> <p class="credit">By Nate Horwitz-Willis</p> </div>
</body>
</html> <script src="js/index.js"></script>
</body>
</html>

Random Quote Machine Exercise - Script Codes JS Codes

$(document).ready(function() {	var errorMessage={message:"Unable to get data ! Please Try Again !",by:"Nate Horwitz-Willis"};	function getQuote(){	$.ajax({	url:'https://andruxnet-random-famous-quotes.p.mashape.com/',	type:'POST',	dataType:'json',	success:function(data){	$("#quote").html('"'+data.quote+'"');	$("#author").html(data.author);	$("a.twitter-share-button").attr("data-text",data.quote);	$("#quote,#author").addClass('animated bounceInLeft');	$("#quote,#author").one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){	$("#quote,#author").removeClass('animated bounceInLeft');	});	},	error:function(error){	$("#quote").html(errorMessage.message);	$("#author").html(errorMessage.by);	},	beforeSend:function(xhr){	xhr.setRequestHeader("X-Mashape-Authorization", "PSKgJRegHBmsh1A157uuoGMhkUpxp1hW4VQjsn5BUUBMMF18AH");	}	});	}	getQuote();	$("#new").click(function() {	getQuote();	});	$("#tweet").click(function() {	var curQuote=$("#quote").html();	var curAuthor=$("#author").html();	var url='https://twitter.com/intent/tweet?text=' + encodeURIComponent(curQuote+"\n"+curAuthor);	window.open(url)	});
});
Random Quote Machine Exercise - Script Codes
Random Quote Machine Exercise - Script Codes
Home Page Home
Developer Nathaniel Horwitz-Willis
Username natewillisii
Uploaded December 06, 2022
Rating 3
Size 2,281 Kb
Views 8,096
Do you need developer help for Random Quote Machine Exercise?

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!

Nathaniel Horwitz-Willis (natewillisii) Script Codes
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!