The situation is as follows:
<section class="row_clear"> <div></div> <div></div> <div></div> <div></div> </section> A special block must be inserted into the existing structure between the second and third div.
<div class="clearfix hidden-lg"></div> That so turned out:
<section class="row_clear"> <div></div> <div></div> <div class="clearfix hidden-lg"></div> <div></div> <div></div> </section> It seems to be nothing complicated, here's the code
var div = document.createElement('div'); div.className = "clearfix hidden-lg"; row_clear.insertBefore(div, row_clear.children[2]); But then there was a problem, like "row" blocks on the page can be from 10 and more. And with the help of 'cloneNode' I don’t want to implement it, since the code will be huge, and for each new 'row' I’ll have to create a new variable ...
Help solve this problem ... I can’t find the right answer anywhere ...