Skip to content

Instantly share code, notes, and snippets.

Created October 27, 2015 20:54
Show Gist options
  • Select an option

  • Save anonymous/1aa2f07b8fa3f8af4f03 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/1aa2f07b8fa3f8af4f03 to your computer and use it in GitHub Desktop.
Welcome To Javascript // source http://jsbin.com/gepokug
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-git.js"></script>
<meta charset="utf-8">
<title>Welcome To Javascript</title>
<style id="jsbin-css">
body {
text-align: center;
}
button {
font-size: 50px;
padding: 20px;
}
p {
font-size: 30px;
color: green;
}
</style>
</head>
<body>
<h1>Welcome to Javascript</h1>
<button>CLICK ME</button>
<p></p>
<script id="jsbin-javascript">
/*
Directions:
Change the Javascript code below to say that you are the greatest after you click the button.
*/
$(function() {
// Who is the greatest? Remember to use "quotation marks"!
var name = "Tom";
// When button gets clicked, change some HTML
$("button").on("click", function(){
$("p").html(name + " IS THE GREATEST WOOOOOOOHHHH!!111!");
});
});
</script>
<script id="jsbin-source-css" type="text/css">body {
text-align: center;
}
button {
font-size: 50px;
padding: 20px;
}
p {
font-size: 30px;
color: green;
}</script>
<script id="jsbin-source-javascript" type="text/javascript">/*
Directions:
Change the Javascript code below to say that you are the greatest after you click the button.
*/
$(function() {
// Who is the greatest? Remember to use "quotation marks"!
var name = "Tom";
// When button gets clicked, change some HTML
$("button").on("click", function(){
$("p").html(name + " IS THE GREATEST WOOOOOOOHHHH!!111!");
});
});</script></body>
</html>
body {
text-align: center;
}
button {
font-size: 50px;
padding: 20px;
}
p {
font-size: 30px;
color: green;
}
/*
Directions:
Change the Javascript code below to say that you are the greatest after you click the button.
*/
$(function() {
// Who is the greatest? Remember to use "quotation marks"!
var name = "Tom";
// When button gets clicked, change some HTML
$("button").on("click", function(){
$("p").html(name + " IS THE GREATEST WOOOOOOOHHHH!!111!");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment