<div id="hello1">1</div>
<div id="hello2">2</div>
div{
  background: #00FF00;
  height: 50px;
  width: 50px;
  margin: 10px;
  text-align: center;
  font-size: 30px;
  cursor: pointer;
}
document.getElementById('hello1').addEventListener('click',function(){
    this.innerHTML=Number(this.innerHTML) + 1;
}.bind(document.getElementById('hello1')));

$('#hello2').on('click',function(){
  $(this).html(Number($(this).html()) + 1);
});
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js