0👍
Considering “url” to be the service returning percentage value in json form.
$.ajax({
url:url,
success:function(response) {
call_your_function(response.percentage);
}
});
Also as mentioned by @Rajesh use jquery methods to style the elements.
Source:stackexchange.com