Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Pricing component

@srirakeshv

Desktop design screenshot for the Interactive pricing component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


All feedback are welcomed.. how to do the progress bar color changing i have tried a lot but doesn't works any suggesstions..

Community feedback

Yuki Lun 190

@yukilun

Posted

Hi!👋 For changing the progress bar color, you can add a event listener to listen for the input event of #myRange and change the background of #myRange with linear-gradient property based on its value:

myRange.addEventListener('input', (e) => {
	const percent = e.target.value / 1000 * 100;
	myRange.style.background = `linear-gradient(to right, hsl(188, 100%, 82%) ${percent}%, hsl(180, 2%, 84%) ${percent}%)`;
});

Hope you find it helpful!😊

0

@srirakeshv

Posted

Thankyou so much for your help @yukilun

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord