GithubHelp home page GithubHelp logo

help about jquery-circle-progress HOT 8 CLOSED

kottenator avatar kottenator commented on June 8, 2024
help

from jquery-circle-progress.

Comments (8)

kottenator avatar kottenator commented on June 8, 2024

Here is an example where animationStartValue works fine at the first time. Or have I misunderstood you?

from jquery-circle-progress.

kottenator avatar kottenator commented on June 8, 2024

@coolara - has it solved your problem?

from jquery-circle-progress.

coolara avatar coolara commented on June 8, 2024

Not yet. The problem still exists

from jquery-circle-progress.

kottenator avatar kottenator commented on June 8, 2024

Do you have this problem with my demo? Could you, please, give me a code example of the problem or to explain it more?

from jquery-circle-progress.

coolara avatar coolara commented on June 8, 2024
$.rotate({value: 0.8, time: 3, animationStartValue: 0.2});

$.rotate = function (obj) {
    var rotate = $("<div class='bg'></div>"
        + "<div id='circle'>"
        + "</div>");
    $("#rotate").append(rotate);
    $('#circle').circleProgress({
        value: obj.value,
        size: 250,
        fill: {
            gradient: ["#5DC0FF", "#A5D0DC"]
        },
        emptyFill: "rgba(250, 250, 250, .1)",
        startAngle: -Math.PI / 2,
        thickness: 10, 
        lineCap: "round",

        animation: {
            duration: obj.time * 1000
        },
        animationStartValue: obj.animationStartValue
    });
};

from jquery-circle-progress.

coolara avatar coolara commented on June 8, 2024

second do this funciton ,
qq 20151003103753
first do this function
qq 20151003103656

from jquery-circle-progress.

kottenator avatar kottenator commented on June 8, 2024

According to your code:

  • each time you call $.rotate(...) - you insert new <div id="circle"> into <div id="rotate">
  • then you do $("#circle").circleProgress(...).
  • jQuery finds not the newly inserted <div id="circle"> but the "old" one (the first one)

This is probably not what you want and the reason of your problem.

I don't 100% understand what you're trying to do, so I give you two solutions:

  1. If you want to create a circle each time you call $.rotate(...) - solution 1
  2. If you want to re-use the same circle and just to restart its animation when you call $.rotate(...) - solution 2

from jquery-circle-progress.

coolara avatar coolara commented on June 8, 2024

Thank you for solving my problem, It runs correctly

from jquery-circle-progress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.