javascript - jQuery animation not working (number countdown/count-up) -
I have a script that looks like the following:
function powerClick (level) , Cost, user) {click = number (click) - cost; AddBPS (); } Function addBPS () {var = {property: $ ('# current'). Text ()}; Var to = {property: number (click)}; JQuery (from) .from {{period: 1000, step: function} ($ ('# current'). Text ((floor.or this.property));}}};}
Runs the first function when a button is clicked, and adjusts the value of click
then this function runs addBPS
(bottom right).
The function addBPS
, however, does not count completely the number stored in the variable clicks
.many time, the function powerClick
sets the variable click
to 0. However, B function addBPS
is running, not a counter
possible problems here Seeing:
- This can be because the click globally is not defined, so every time this first task is finished running that the value is destroyed.
- Want to replace this property by.property or by.property?
-
Less common variable names like "From" or "From" Can use. (Happened to me)
var click; Function powerclick (level, cost, user) {click = number (click) - cost; AddBPS (); } Function addBPS () {var data_before = {property: $ ('# current'). Text ()}; Var data_after = {property: number (click)}; JQuery (from). Permission (from, {Duration: 1000, Phase: function () {$ ('# current'). Text ((Math.floor (data_after.property)))}}}); }
Comments
Post a Comment