I want to select an element which was created by the CSS selector :before
.
I tried it by using $('#element:before')
, but that did not work, because it selected the whole element and not only the :before
element.
Here is the sample code: DEMO
In that example, only the string "1. " should be red, not the whole string. Any idea how to do this?