title: jQuery/CSS selecting :before and :after pseudo-elements
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3743513/how-do-i-access-style-properties-of-pseudo-elements-with-jquery">How do I access style properties of pseudo-elements with jQuery?</a><br>
    <a href="https://stackoverflow.com/questions/5041494/manipulating-css-before-and-after-pseudo-elements-using-jquery">Manipulating CSS :before and :after pseudo-elements using jQuery</a>  </p>
  </blockquote>
  
  
  
  <p>I'm making an on/off switch and decided to try using the <code>:after</code> pseudo-element for the physical switch.  The styling is such that I just need to switch the pseudo element between float right and float left to switch it on and off.</p>
  
  <p>Can I select pseudo-elements in jQuery or plain javascript?  I've tried <code>$("#myid:after")</code> and <code>$("#myid::after")</code>, both of which work in the stylesheet but are not working as jQuery selectors.</p>
  
  <p>Or do I have to give in and use an extra div or span? That seems like it would be a pretty big drawback for pseudo elements.</p>