1

How detect in js :hover in element :

.box-cart:after{}

I wan't to show another div in other parent child when

.box-cart:after:hover{}
Michael Phelps
  • 3,451
  • 7
  • 36
  • 64
  • Possible duplicate - http://stackoverflow.com/questions/5041494/manipulating-css-pseudo-elements-such-as-before-and-after-using-jquery?rq=1 – Paulie_D May 29 '15 at 09:03
  • duplicate ? Realy ? Where ? – Michael Phelps May 29 '15 at 09:46
  • That's why it's a **possible** duplicate. The subject if this question and the linked one is JS/JQ control of pseudo elements..and the answer is..you can't....yet. – Paulie_D May 29 '15 at 09:54

1 Answers1

4

Pseudo-elements aren't elements, and currently you can't access them via the DOM. So you can't hook event handlers on them. As far as I can tell, you also can't apply pseudo-classes like :hover to them in CSS.

T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875