I have a variable that contains several HTML codes. This variable is already mounted, what I have to do is replace an attribute that is in a (tabindex)
child div. Is there any function where I can change this variable, without having to give each one.
Inside this variable I have 2 tabindex, in which I have to change.
var div = '
<div class="teste">
Meu teste
<div class="filho" tabindex="1">
Div filho
<input type="text" class="search" tabindex="2" />
</div>
</div>';
ex:
.after(function(){
return $(div)....attr("tabindex","10");
})