$(this.$el).find('.jplus-setting-vue').mousedown(function() {
theInterval = setInterval(function() {
vm.crowdfunding.goal =
(parseFloat(vm.crowdfunding.goal) ?parseFloat(vm.crowdfunding.goal):0) + addVelocity;
counter++;
if (addVelocity < 25) {
addVelocity++;
}
}, 400);
});
$(this.$el).find('.jplus-setting-vue').mouseup(function() {
window.clearInterval(theInterval);
if (counter === 0) {
vm.crowdfunding.goal++;
}
counter = 0;
addVelocity = 1;
});
var theInterval = null;
$(this.$el).find('.jplus-setting-vue').mousedown(function() {
if(theInterval === null){
theInterval = setInterval(function() {
vm.crowdfunding.goal =
(parseFloat(vm.crowdfunding.goal) ?parseFloat(vm.crowdfunding.goal):0) + addVelocity;
counter++;
if (addVelocity < 25) {
addVelocity++;
}
}, 400);
}
});
$(this.$el).find('.jplus-setting-vue').mouseup(function() {
window.clearInterval(theInterval);
if (counter === 0) {
vm.crowdfunding.goal++; // it was just click
}
counter = 0;
addVelocity = 1;
theInterval = null;
});
$(this.$el).find('.jplus-setting-vue').mousedown(function(event) {
if (event.which != 1) return;
theInterval = setInterval(function() {
vm.crowdfunding.goal =
(parseFloat(vm.crowdfunding.goal) ?parseFloat(vm.crowdfunding.goal):0) + addVelocity;
counter++;
if (addVelocity < 25) {
addVelocity++;
}
}, 400);
});
$(this.$el).find('.jplus-setting-vue').mouseup(function() {
window.clearInterval(theInterval);
if (counter === 0) {
vm.crowdfunding.goal++;
}
counter = 0;
addVelocity = 1;
});