I want the numbers to increase every 100ms while holding down the mouse. What am I doing wrong?
var i = 1;
$("#plus1").mousedown(function () {
loopthis = setinterval(repeatingfunction(), 100);
}).mouseup(function () {
clearInterval(loopthis);
});
function repeatingfunction() {
$("#testarea").append(i);
i = i + 1;
}