How in JavaScript with replace replace in the <a> tag the content of the data parameter with the variable v1 , and the content of the span with v2 ? In other words, %name1 on 'Π‘ΡΠΈΡΠ°Π»ΡΠ½Π°Ρ ΠΌΠ°ΡΠΈΠ½Π°' , %name2 on 'ΠΡΡΠΊΠ°' . At the same time creating a clone of the html code by writing it into a variable:
var v1 = 'Π‘ΡΠΈΡΠ°Π»ΡΠ½Π°Ρ ΠΌΠ°ΡΠΈΠ½Π°'; var v2 = 'ΠΡΡΠΊΠ°'; html:
<h3 class="category"> <a class="link" href="#" data="%name1"> <span class="cat-title">%name2</span> </a> </h3> Thank!