• Kursy
  • Kompilator kodu
  • Dyskusja
  • Cennik
  • Zespoły
Menu
+ 4

Is it possible to add a property to a pseudo-element via JS?

I need that when I click on the button, its pseudo-element icon disappears and another appears, but without libraries.

cssjavascriptpropertiespseudo-element
5th Jan 2020, 5:22 PM
Anna/Аня
Anna/Аня - avatar
2 odpowiedzi
+ 6
Have you tried this: https://www.google.com/url?sa=t&source=web&rct=j&url=https://stackoverflow.com/questions/4481485/changing-css-pseudo-element-styles-via-javascript&ved=2ahUKEwiUu87xgO3mAhWH2BQKHQvSBygQFjAAegQIBhAB&usg=AOvVaw3-ECn4D2fIBNK8RG2fNPvP
5th Jan 2020, 5:42 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 3
Aymane Boukrouh [INACTIVE] thanks
5th Jan 2020, 5:46 PM
Anna/Аня
Anna/Аня - avatar

Często masz takie pytania?

Ucz się bardziej efektywnie, za darmo:

  • Wprowadzenie do Pythona

    7.1M uczących się

  • Wprowadzenie do Java

    4.7M uczących się

  • Wprowadzenie do C

    1.5M uczących się

  • Wprowadzenie do HTML

    7.5M uczących się

Zobacz wszystkie kursy
Popularne dzisiaj
Hello! I’m 15 and I want to learn programming to become a web developer. Any advice?
0 Votes
help string permutation
0 Votes
Code is wrong somehow, I need help!
0 Votes
APP FREEZING
0 Votes
@sololearn Python
1 Votes
Is the Python Developer course the final course of Python?
0 Votes
Newb
0 Votes
How to increase My Level is SoloLearn ?
0 Votes
Building an AI Call Tracking & Routing System — Anyone tried it?
0 Votes
Can you give me some advice on what project I can start with today to practice HTML, CSS, and JavaScript?
0 Votes