Simple Counter issue
- by TechyDude
I want to make a very simple counter that increases the value when you click a button. When I click the add button the first time, the number doesn't increase, however I console log the value which increases the result everytime. Any ideas?
The fiddle: http://jsfiddle.net/techydude/H63As/
$(function() {
var //valueCount = $("counter").value(),
counter = $("#counter"),
addBtn = $("#add"),
value = $("#counter").html();
addBtn.on("click", function() {
counter.html(value ++);
console.log(value);
return
});
});