<a href="#" class="btn">Кликни меня</a>
<div class="counter">1</div>
body {
text-align: center;
margin: 50px;
}
a {
text-decoration: none;
color: #000;
display: inline-block;
padding: 10px 20px;
border: 1px solid #000;
border-radius: 5px;
margin: 20px;
}
$(document).ready(function() {
$(".btn").on("click", function() {
var i = 1;
var timerId = setInterval(function() {
$(".counter").text(++i);
}, 1000);
});
});
This Pen doesn't use any external CSS resources.