Created
March 22, 2016 17:41
-
-
Save anonymous/4c64641e747658e7a864 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/yoqokehuta
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.1.4.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<button id="1">click me!</button> | |
<p id="2"></p> | |
<script id="jsbin-javascript"> | |
count = 0; | |
$("#1").click(function(){ | |
count++; | |
$("#2").html(count); | |
if (count > 20){ | |
alert("stop clicking me!"); | |
} | |
}); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">count = 0; | |
$("#1").click(function(){ | |
count++; | |
$("#2").html(count); | |
if (count > 20){ | |
alert("stop clicking me!"); | |
} | |
});</script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
count = 0; | |
$("#1").click(function(){ | |
count++; | |
$("#2").html(count); | |
if (count > 20){ | |
alert("stop clicking me!"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment