rnkwill
KPCKevin Powell - Community
•Created by rnkwill on 10/14/2023 in #front-end
How to check if an element contains a class using JavaScript?
The number increase as they should. What needs to happen is if the div.stat-container has class dark-bg the circular progress bar turns white instead of grey. If see the first computedGradientForPercentage function it works as it should but if you comment that out and uncomment the second version of that function under it - it breaks.
33 replies
KPCKevin Powell - Community
•Created by rnkwill on 10/14/2023 in #front-end
How to check if an element contains a class using JavaScript?
Ugh. Sorry I need to update the code pen some more. Been flipping through so many things. The code pen has been updated to reflect all recent updates! Thanks for calling that out @ἔρως
33 replies
KPCKevin Powell - Community
•Created by rnkwill on 10/14/2023 in #front-end
How to check if an element contains a class using JavaScript?
33 replies
KPCKevin Powell - Community
•Created by rnkwill on 10/14/2023 in #front-end
How to check if an element contains a class using JavaScript?
My code pen has been updated. The test class function behaves as it should but once I try to run the if else statement in the computedGradientForPercentage function it breaks. So it has something to do with that but I can’t quite figure out why.
33 replies
KPCKevin Powell - Community
•Created by rnkwill on 10/14/2023 in #front-end
How to check if an element contains a class using JavaScript?
I reverted back to classList.contains but when I console log it returns the first node item in the list 3x.
33 replies
KPCKevin Powell - Community
•Created by rnkwill on 10/14/2023 in #front-end
How to check if an element contains a class using JavaScript?
Any ideas anyone?
33 replies
KPCKevin Powell - Community
•Created by rnkwill on 10/14/2023 in #front-end
How to check if an element contains a class using JavaScript?
It keeps saying it has the class but only 1 of the containers has the class
33 replies
KPCKevin Powell - Community
•Created by rnkwill on 10/14/2023 in #front-end
How to check if an element contains a class using JavaScript?
33 replies
KPCKevin Powell - Community
•Created by rnkwill on 10/14/2023 in #front-end
How to check if an element contains a class using JavaScript?
I updated the code pen after running a loop in the function but now it keeps firing and not sure what can be causing that now.
33 replies
KPCKevin Powell - Community
•Created by rnkwill on 10/14/2023 in #front-end
How to check if an element contains a class using JavaScript?
I see. I had to step away but will try running a loop to check and will report back.
33 replies
KPCKevin Powell - Community
•Created by rnkwill on 10/14/2023 in #front-end
How to check if an element contains a class using JavaScript?
33 replies
KPCKevin Powell - Community
•Created by rnkwill on 9/21/2023 in #front-end
Intersection Observer API: How to have each circular progress bar fill when they are in viewport?
Can I PM either one of you guys for some help on this? I tried looking up lerp and doing a bunch of other things but the decimal thing is really going over my head
54 replies
KPCKevin Powell - Community
•Created by rnkwill on 9/21/2023 in #front-end
Intersection Observer API: How to have each circular progress bar fill when they are in viewport?
This really helped a lot.
54 replies
KPCKevin Powell - Community
•Created by rnkwill on 9/21/2023 in #front-end
Intersection Observer API: How to have each circular progress bar fill when they are in viewport?
Thanks for the help! I'll try giving this a shot and hopefully I won't have to post another question lol
54 replies
KPCKevin Powell - Community
•Created by rnkwill on 9/21/2023 in #front-end
Intersection Observer API: How to have each circular progress bar fill when they are in viewport?
But having the animations take the same time to fill up regardless of value would be the best and I know that might come up during review.
54 replies
KPCKevin Powell - Community
•Created by rnkwill on 9/21/2023 in #front-end
Intersection Observer API: How to have each circular progress bar fill when they are in viewport?
Ugh yeah that sounds super annoying. I do like that second option with interpolation but I have never even done that before lol I'm a junior still
54 replies
KPCKevin Powell - Community
•Created by rnkwill on 9/21/2023 in #front-end
Intersection Observer API: How to have each circular progress bar fill when they are in viewport?
or any decimal value for that matter
54 replies
KPCKevin Powell - Community
•Created by rnkwill on 9/21/2023 in #front-end
Intersection Observer API: How to have each circular progress bar fill when they are in viewport?
the circular value doesn't stop increasing at all. How would I be able to rewrite it to make it stop at 99.9?
54 replies
KPCKevin Powell - Community
•Created by rnkwill on 9/21/2023 in #front-end
Intersection Observer API: How to have each circular progress bar fill when they are in viewport?
Also another question.. when I change the value in the HTML to a decimal such as 99.9
54 replies
KPCKevin Powell - Community
•Created by rnkwill on 9/21/2023 in #front-end
Intersection Observer API: How to have each circular progress bar fill when they are in viewport?
WOW! Thanks for the assist!
54 replies