<section id="donate">
<p id="thankyou">Thanks for doing your part to protect the environment!</p>
<input id="amount" type="text" placeholder="enter an amount">
<button id="donate-button">Donate</button>
<div class="donate-box"></div>
</section>
$("#donate-button").click(function() {
console.log("This is working for now");
$(".donate-box").fadeIn();
});
// When the donation amount is entered --
// 1. Displays the hidden div ".donate-box" (background color: black)
// 2. Displays a message inside ".donate-box" that says:
// "Based on your location in <your city name>,
// your donation of $X will go a long way.
// This is the equivalent of:
// -- x Starbucks coffees
// -- x Pairs of Shoes
// -- x Bottles of Wine
// -- x Movie Tickets
// -- x Dinners at your neighborhood cafe
// in <your city name>
// Thank you for doing your part to protect the environment!"
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.