1
In my application has a siples javascript to increment a field, the problem that in safari gets ultra slow almost does not work, while in Chrome works perfectly. There is something to do to run normal on safari?
js:
$("#aumentaDesconto").click(function () {
var input = $("#txtDesconto")[0];
var desconto = parseInt(input.value, 10) + 1;
input.value = desconto;
});
Post also the function
calcularValor
.– bfavaretto
I’m actually going to remove it because Ian has nothing bird with my problem.
– War Lock
Slow to increase field values.
– War Lock
I find it hard to blame being in this code, but anyway try
var desconto = +input.value + 1;
– bfavaretto
I think it’s the safari’s fault, I saw several reports of slow safari and javascript, but I need the same running in safari.I will test your code
– War Lock
Utilize
console.count('teste')
inside the function and see on your console how many times the function has been called. Maybe you left this code inside a loop and the event was linked several times.– Oeslei