Stan Long
KPCKevin Powell - Community
•Created by Stan Long on 2/20/2024 in #front-end
Help with storing user Data
Hi everyone, hope the coding is going well. I'm at the part of my website where I need to store use data. Would that be stored in local storage, or local and session storage?
7 replies
KPCKevin Powell - Community
•Created by Stan Long on 2/20/2024 in #front-end
Why does click work but hover doesn't?
Here's the code I'm having an issue with
one.addEventListener('click', () => {
if (one.hasAttribute('checked')) {
one.style.backgroundColor = 'green'
two.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
three.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
four.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
five.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
}
})
one.addEventListener('mouseenter', () => {
one.style.backgroundColor = 'green'
two.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
three.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
four.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
five.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
})
one.addEventListener('mouseleave', () => {
one.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
two.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
three.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
four.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
five.style.backgroundColor = 'rgba(211, 211, 211, 0.9)'
})
14 replies
KPCKevin Powell - Community
•Created by Stan Long on 2/16/2024 in #front-end
Adding data-bs-slide-to
Hi everyone, was wondering on how I can add a data-bs-slide-to-(number increases by one everytime I click on a button) into a li tag. Here's the HTML code
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-bs-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-bs-slide-to="2"></li>
<li data-target="#carouselExampleIndicators" data-bs-slide-to="3"></li>
</ol>
Here's the JS code I have so far
const createLi = document.createElement('li')
createLi.innerHTML =
<li data-target="#carouselExampleIndicators" data-bs-slide-to="3"></li>
;
const getCarouselIndicators = document.querySelector('.carousel-indicators');
getCarouselIndicators.append(createLi)1 replies
KPCKevin Powell - Community
•Created by Stan Long on 1/19/2024 in #front-end
Error code 522
Hi, I'm trying to figure out why I keep getting Error code 522 while trying to use my website. Its hosted by cloudfare, and I also did have it linked to github. The website is thegoodspoolservices.com, any advice would be appreciated
4 replies
KPCKevin Powell - Community
•Created by Stan Long on 12/31/2023 in #front-end
Need help with button click output
Hey, can anyone help me with this big issue I'm having right now. I'm trying to have an alert be printed out if one set of buttons are clicked, and a different type of alert be printed out if a different sets of buttons are clicked. It's for a pool business website, and I'm trying to print out a different price based on the buttons the user clicks. I tried if else statement, but it gets stuck on the first if statement, and doesn't switch if another if else statement is true
8 replies