pguso/js-plugin-circliful

How to reanimate when tab is active?

Alchaves opened this issue · 2 comments

I have a couple of circliful elements in a tab that, initialy, are not active.
How do I reanimate the elements when tab gets active?
Or even, how do I use animateInView to work with tabs?

Best regards.

This was how I made circliful reanimate. Probably not the best way to do it, but it worked.
It more like re-circliful than re-animate circles

$( document ).ready(function() { 
    	var data = {
              animation: 1,
              animationStep: 5,
              foregroundBorderWidth: 15,
              backgroundBorderWidth: 15,
              percent: 38,
              percentages: [10, 20, 30]
            }
        $("#test-circle").circliful({
             animation: 1,
             animationStep: 5,
             foregroundBorderWidth: 15,
             backgroundBorderWidth: 15,
             percent: 38,
             percentages: [10, 20, 30]
        });

        $('#reset').click(function() {
        	$("#test-circle").circliful(data);
        });
 });

https://jsfiddle.net/9dajqcr1/936/

Thanks for the reply, but what that is doing is replicate de object...
However, that answer seems close to the final answer.