How to change the class name of the div tag dynamically that is in curly braces with javascript in django

advertisements

I need to know how to change the class name of div tag dynamically which is in curly braces using javascript in django.Normally we did with the help of attr. Here i am little confused to change it.The div tag look like below

 <div class="clname{{progress}}"></div>

I need to change the value of progress which is mentioned the above div tag.Anyone know about to change it using javascript. please let me know how to do that.

progress value should be change dynamically as 0,1,2,3,etc....

Thanks in advance.


it's Very Simple using jquery.

$("div").replace("{{progress}}", "replaceValue");