JSFiddle - React, Tailwind, and code Playground
HTML
<input type="submit" id="plus1" value="+" style="font-weight:bold; width:50px; height:50px;" tabindex="-1">
<div id="testarea">testarea:</div>
JavaScript
var i = 1;
var loopthis=null;
$("#plus1").on('mousedown',function () {
loopthis = setInterval(repeatingfunction, 100);
}).on('mouseup',function () {
clearInterval(loopthis);
});
function repeatingfunction() {
console.log("alerting");
$("#testarea").text(i);
i++;
}