I have an element with following css style:
#element:after { content: attr(data-percent); }
I'm trying to change data-percent attribute with JQuery like this
$('#element').data('percent', '50%');
Attribute changes, I can check it by console.log($('#element').data('percent'));
, but it won't redraw and still contains old attribute.
What function should I call to make this element updated?