It is impossible to make the mousePressed event normally (when the mouse button is held down, the value increases in increments of one unit), it turns out only a one-time increase, how to make it increase infinitely while the mouse button is pressed?
var i = 5; $(".inc").mousedown(function() { $(".count").val(i++); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <button class="inc">Увеличить<button> <input type="text" class="count">