Select pseudo-elements with jquery [duplicate]
问题 This question already has answers here : Selecting and manipulating CSS pseudo-elements such as ::before and ::after using jQuery (22 answers) Closed 5 years ago . How would you convert this block of css into jquery? .nav li a:first-child:nth-last-child(2):before { content:""; position: absolute; height:0; width: 0; border: 5px solid transparent; top: 50% ; right:5px; } I've tried a couple different ways but nothing I tried worked properly. Where this css selects only before the the jquery