Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
Help with jQuery click event to change background color
I set a div (class=āitemā id=ābackā) I set css with jQuery ā(document).readyā Itās fine so far, the problem comes when I want to use addClass to this div after clicking another div (id=ājoyasā) It goes like: $(document).ready(() => { $(ā#backā).addClass(āindexbackā); }); $(ā#joyasā).click(function() { $(ā#backā).addClass(ājoyasbackā); }); Notes: .indexback class has linear gradient, and I want it to change to white when clicking the div ājoyasā. So the class .joyasback has a solid white background.
1 Resposta
+ 2
Can you attach the code bit link please? incomplete snippet like this make it harder to find the problem cause there are things that aren't shown.
https://www.sololearn.com/post/75089/?ref=app