1

Is it posible to target the ::before with jquery?

This is what I'm doing with no luck:

    $("nav").hover(function(){
        $('nav ul li a.active::before').hide();
    },function(){
        $('nav ul li a.active::before').show();
    });

It doesn't hide the ::before, any ideas why is not working?

codek
  • 343
  • 4
  • 20
  • 49

1 Answers1

0

:before and :after is not in DOM, so you cannot select them with jQuery/JS. Read more about it HERE

Community
  • 1
  • 1
Justinas
  • 41,402
  • 5
  • 66
  • 96