javascript - font awesome: retrieve css of pseudo element displays a small rectangle -


i trying retrieve css value of font awesome pseudo element. css:

.pe-icon--check:before {     content: '\f00c'; } 

i use query

var symb = window.getcomputedstyle($('.pe-icon--check').get(0), ':before').getpropertyvalue('content'); 

but result small rectangle . value need \f00c. please me fix this?

the below solution worked!!

 var content = window.getcomputedstyle(document.queryselector('.pe-icon--check'),':before').getpropertyvalue('content'); 
function entityforsymbolincontainer(character) {     var code = character.replace(/"/g, '').charcodeat(0);     var codehex = code.tostring(16).touppercase();     while (codehex.length < 4) {         codehex = "0" + codehex;     }     return "\\" + codehex + ";"; } 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -