I'm just learning the basics of javaScript and jquery and have tried to put together this simple program http://codepen.io/mike-grifin/pen/oXjVYW. It's simply a box that displays a number and there is two buttons, one adds 10 and the other button subtracts 10. Ive set the output to alert and it seems to be working fine but if I remove the alert (below) it's not inputting the results into the container div.
$(document).ready(function(){
var startPoint = +90;
$(document).find('#container').append(startPoint);
if($('.increase').click(function(){
startPoint += +10;
}));
I've also tried to append the startPoint var again but it doesn't overwrite the original:
$(document).ready(function(){
var startPoint = +90;
$(document).find('#container').append(startPoint);
if($('.increase').click(function(){
startPoint += +10;
$(document).find('#container').append(startPoint);
}));
All the code is at the codepen link. I'm just learning so sorry if it's really obvious or easy. Any educational input or advice would be greatly appreciated. Thanks.