I have a userscript that detects if a certain bar fills up more, except there is one problem: on the load of the page, instead of just showing the current % and then going up later when x action occurs, it starts at 0 every page load, then animates up to the current %, and then goes up when x action occurs.
How can I get around this? I've tried @run-at document-idle
and $("#meterFill").finish()
at the beginning of my script but neither seem to work.
Here is my code:
new ResizeSensor($("#meterFill"), function () {
console.log("do something");
});
I fixed my own problem adding jQuery.fx.off = true
to the start of my script.