I would like to get the content
from my :before
tag. I know some will say it's not a real (pseudo) element but there is a way in JS but can some one help me do it in JQ because I have multiple tags and I want to iterate with $.each
...
Here is how I got the content
in JS
window.getComputedStyle(document.querySelector('i'), ':before').getPropertyValue('content')
How can I do this in JQ?
Here is what I tried:
$.each($('div'),function(){
$(this).find('i:before').css('content');
});
Print a special char?
When I get the content
I would like to print it, the problem is it's a special character and I would like to get a real code.
My content
has a code like this: \e002
. So I would like to print it like that not
.