Created
January 10, 2017 11:58
-
-
Save anonymous/7030f77f890a13569b7c55c967f32506 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/noqayed
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> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <style id="jsbin-css"> | |
| h1 { | |
| text-align: center; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>Cat clicker! </h1> | |
| <img id="cat" | |
| src="https://lh3.ggpht.com/nlI91wYNCrjjNy5f-S3CmVehIBM4cprx-JFWOztLk7vFlhYuFR6YnxcT446AvxYg4Ab7M1Fy0twaOCWYcUk=s0#w=640&h=426"></img> | |
| <script id="jsbin-javascript"> | |
| var elem = document.getElementById('cat'); | |
| var count = 0; | |
| elem.addEventListener('click', function(e){ | |
| count++; | |
| console.log('I am clicked: '+ count); | |
| console.log('meow'); | |
| }); | |
| </script> | |
| <script id="jsbin-source-css" type="text/css">h1 { | |
| text-align: center; | |
| }</script> | |
| <script id="jsbin-source-javascript" type="text/javascript">var elem = document.getElementById('cat'); | |
| var count = 0; | |
| elem.addEventListener('click', function(e){ | |
| count++; | |
| console.log('I am clicked: '+ count); | |
| console.log('meow'); | |
| });</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
| h1 { | |
| text-align: center; | |
| } |
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
| var elem = document.getElementById('cat'); | |
| var count = 0; | |
| elem.addEventListener('click', function(e){ | |
| count++; | |
| console.log('I am clicked: '+ count); | |
| console.log('meow'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment