I'm having trouble with my CSS pseudo-code not being recognized by jQuery. Here is the code I'm using:
CSS:
h1 {
background: red;
width: 100px;
display: inline-block;
}
h1:after {
content:" | ";
background:blue;
display: inline-block;
}
Then in jQuery, I have the following:
console.log($('h1').css('backgroundColor'));
It returns:
rgb(255, 0, 0)
However, when I try:
console.log($('h1:after').css('backgroundColor'));
It returns:
undefined