Visuals
-
The application should display two cats. Each cat includes
- the cat's name
- a picture of the cat
- text showing the number of clicks
-
The specifics of the layout do not matter, so style it however you'd like.
Interaction
- The number of clicks should increment when each cat picture is clicked.
Inspiration
Thanks to chewie for the photo.
Resources
In case you need a refresher on events and event listeners, here are some links.
If you're writing Cat Clicker with vanilla JS (no jQuery), you'll be adding the "click" event with elem.addEventListener().
var elem = document.getElementById('my-elem');
elem.addEventListener('click', function(){
//the element has been clicked... do stuff here
}, false);
If you're using jQuery, you'll be adding the "click" event listener with [jQuery.click()](http://api.jquery.com/click/).
$('#my-elem').click(function(e) {
//the element has been clicked... do stuff here
});
ps. Use ES6