Is there any way to insert a break element into my markup after every element with a class 'record'?
Example:
HTML
<div class="block" id="codeBlock">
<div class="record">t1</div>
<div class="record">t2</div>
<div class="tlast">
<div class="record"></div>
<div class="record">x1</div>
<div class="record">x2</div>
</div>
</div>
JS
document.getElementById('codeBlock')
I have the whole element, now I want to add a break tag after every tag with class 'record' no matter how deep it goes without using jQuery.
Any help would be great.
Thanks