So I'm using jQuery knob for a project of mine to indicate progresses around. This time I need to kind of simulate a progress, so an exact progress will not be given, instead I will be using knob's × 'cursor' mode
which can be seen at the website. It's that partially filled circle.
In my HTML the whole thing would look like this:
<input type="text" id="progress" value="0" data-cursor="true" data-displayInput="false" data-thickness=".3" data-width="128" data-height="128" data-fgColor="#ad3b3b" data-readOnly="1" data-bgColor="#e2e2e2" />
<script>$('#progress').knob();</script>
The result would be similar to this:
Now I want to use this as a preloader. I want the value="0"
from the input
tag to increase and once it hits 100, it goes back to 0 repeating the whole process. This would look pretty slick and awesome.
This preloader would keep rotating until I tell it to stop with a success
event of a $.ajax
request.
What I need help with:
The only thing I need help with is make the progress rotate infinitely until I tell it to stop. The stopping part is not a big deal, but I don't know how to trigger the rotation with jQuery/JS
Thank you.