This seems like a very simple thing to do, but I can’t seem to get it to work. I have:
<button id="more">more</button>
<button id="less">less</button>
<p id="info"></p>
<script>
var howMany = 1;
$(#more).click(function(){
howMany + 1;
});
$(#less).click(function(){
howMany - 1;
});
$("#info").text(howMany);
</script>
I simply want the info paragraph to increase or decrease when the user click more or less.
You have several mistakes in your code, as others have already mentioned like missing quotes in selector, not reassigning variable value after incrementing/decementing.
Here is a working Fiddle