I'm trying to dynamically set the content property of a CSS Style using jQuery. In the following Fiddle, I'd like the output to read "100% Completed" after the script executes.
I've tried just about every combination of CSS Selectors I could think of, and have failed miserably.
HTML
<div data-chart="1">
<div class="chart"><span> Completed</span></div>
</div>
CSS
[data-chart="1"] .chart:before {
content: "50%";
}
JS
// This obviously doesn't work
$('[data-chart="1"] .donut-chart:before').css('content', '100%');
Thanks for any guidance!