stepValue isn't defined and keeps "running"
See original GitHub issueUsing this handy script on a website, checked the browser error log (firefox & chrome) and see the following:
My code is:
$('.first.circle').circleProgress({
value: 0.6,
emptyFill: "#F4F4F4",
size: 150,
fill: { color: "#3BB9BC" }
}).on('circle-animation-progress', function (event, progress) {
$(this).find('strong').text(String(stepValue.toFixed(2)).substr(1));
});
This won’t cause an issue for sites using 1 progress circle but if you have a few then having a script constantly “running” (the bottom number keeps increasing), could that effect the speed of the website?
p.s. using jquery 1.11.1 and 1.12.3 (upgraded incase it was an issue with the older version).
Is there a fix for this, I did try setting stepValue as a variable but it removes the %age count.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Error handling in Step Functions - AWS Documentation
Learn about AWS Step Functions error handling. ... Runtime error isn't retriable, and will always cause the execution to fail. A retry or...
Read more >ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >How to debug for absolute beginners - Visual Studio
If you're debugging for the first time, learn a few principles to help you run your app in debugging mode with Visual Studio....
Read more >Python NameError: name is not defined - Stack Overflow
That's because the class has not been defined yet at this point. The workaround is using so called Forward Reference, i.e. wrapping a...
Read more >NumPy arange(): How to Use np.arange() - Real Python
The arguments of NumPy arange() that define the values contained in the array correspond to the numeric parameters start , stop , and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you wanted to use the variable
stepValue
(that the plugin gives you access to with this event), then you need to pass it in the progress call:Before:
.on('circle-animation-progress', function (event, progress) {});
After:.on('circle-animation-progress', function (event, progress, stepValue) {});
I’m closing this ticket. Feel free to reopen if you still have problems