How can i get the incremental value of pseudo element's counter value.
counter(my-Counter-Variable , cjk-ideographic)
Is there any way in JavaScript to get the value of above counter content.
Thanks.
How can i get the incremental value of pseudo element's counter value.
counter(my-Counter-Variable , cjk-ideographic)
Is there any way in JavaScript to get the value of above counter content.
Thanks.
You'd have to get the pseudo-element's content
property using window.getComputedStyle()
on the originating element (see How to access CSS generated content with JavaScript), and if the content
property doesn't contain just the counter itself then you'll need to parse the value out of whatever string actually makes up the pseudo-element's content
property. CSS doesn't expose the counter itself directly to you.