-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lazyload or waypoint kind of waiting time #8
Comments
You may use lazy init via jquery.appear plugin. Something like next: var el = $('.circle'),
inited = false;
el.appear({ force_process: true });
el.on('appear', function() {
if (!inited) {
el.circleProgress({ value: 0.7 });
inited = true;
}
}); |
@Khabir-Ahamed: sorry but I don't understand - doesn't the example work for you? |
Did you try to use my example above?????!!! (with |
That's exactly what you need: it doesn't start the circle animation until the circle appears in the viewport |
Hello! I want to show near the end progress value how can I do! |
@kottenator |
@longhoang2984 - see the #52 ticket |
@coreatgit - yes, we can do that. To trigger animation on a button click: var el = $('#circle-container'),
btn = $('#trigger-button'),
val = 0.7; // get it from somewhere, somehow
// Option 1: pre-render an empty circle
circle.circleProgress({ value: 0 });
btn.click(function() {
circle.circleProgress({ value: val });
});
// Option 2: render on click
btn.click(function() {
circle.circleProgress({ value: val });
}); |
@longhoang2984, @coreatgit - sorry for delayed answer. I've lost your comments because you had posted them in a closed ticket. If you want to get the answer faster next time - please, reopen a ticket or create a new one ;) |
Hi kottenotor i cant understand how can i used it please help me................. |
Great plug-in, awesome!!Just a complimentary comment! |
@YueminHu - thanks! ;) |
Hi! All you need to do is:
It should work. On Sun, Jun 5, 2016 at 6:08 AM Alex [email protected] wrote:
|
Hi! When we have more than one circle progress how we can use this? Changing var el = $('.circle'),
inited = false;
el.appear({ force_process: true });
el.on('appear', function() {
if (!inited) {
el.circleProgress({ value: 0.7 });
inited = true;
}
}); |
Instead of |
sorry, this not works, i'm new onto this, any full code would be much helpful. Thank you. |
how to use with multiple on the same page? you cant just change selectors as said above, and changing inited didn't work for me... |
@atiqbd - try this: <div class="circle one"></div>
<div class="circle two"></div>
<div class="circle three"></div> .circle {
margin-bottom: 1000px;
} var circles = $('.circle');
circles.appear({ force_process: true });
circles.on('appear', function() {
var circle = $(this);
if (!circle.data('inited')) {
circle.circleProgress({ value: 0.7 });
circle.data('inited', true);
}
}); Here is a demo example for you. |
Thanks @kottenator for this awesome plugin and the solution, you're a god! 🗡 |
Thank you, @amichel86! I really appreciate when people like my creation and when they're saying good words to me :) That's the best and the only reward I get for my effort here. |
@kottenator I don't mind paying you a beer, what's your PayPal? haha |
Don't think I told that to get a beer :) I really appreciate your words, that's all. (but my e-mail is in the source code, it's for PayPal too). |
Great plugin and solution, loving it so far! Is there an easy solution to having multiple circles on one page each with different values that animate when you scroll them? |
@joeyre you can just make a div for each one and call it a different name. This is what I did.
|
@Jiroscopes ahh perfect thank you! |
Is it possible to use appear.js with circleProgress plugin without setting any value? We have: el.circleProgress({ value: 0.7 }); But I want to use it in WordPress and my HTML is: <div class="circle" data-value="0.94">
<span>94%</span>
</div> |
@nataliakielbicka - this issue seems to be the most popular in my project :) See this demo - it uses The idea is:
This can be done in various ways. |
@nataliakielbicka here's a complete example that I used on one of my recent project. I use a data-value on the circle's div to set the percentage dynamically. <div class="circle__progress" data-value="0.8"><span>1.2G</span></div> $('.circle__progress').circleProgress({
value: 0,
size: 140,
startAngle: 4.7,
emptyFill: "#202020",
fill: {
gradient: ["#fe6b26", "#cd571e"]
}
});
var circles = $('.circle__progress');
circles.appear({ force_process: true });
circles.on('appear', function() {
var circle = $(this);
if (!circle.data('inited')) {
circle.circleProgress({
value: $(this).data('value'),
});
circle.data('inited', true);
}
}); |
how can i animate circle while scrolling down to page ? my page is quite long and this plugin come just above the footer, but it animate, when page loads and when scroll down, can not see the circle progress effect ?
The text was updated successfully, but these errors were encountered: