Im trying to append some html to and element; What i want to do is to count the elements inside a div, then if that number matches certain condition then append some html.
//count how much divs with the class .col-lg are inside #looped
var counting = $("#looped .col-lg").length;
console.log(counting);
//If statement that works;
if (counting == 12 ) {
insideLoop.append('<div class="col-12 col-sm-6 col-md-4 col-lg servicios d-flex flex-column mt-sm-3 justify-content-center align-items-center"></div><div class="col-12 col-sm-6 col-md-4 col-lg servicios d-flex flex-column mt-sm-3 justify-content-center align-items-center"></div>');
}
//But i wanted to start from number 3 - 6 - 9 - 12 etc...
I thought maybe with a for loop a would get it , but i always end up on a dead end or an endless loop.