"); //wrap items
$("#pe_recent_posts-4 .pe-item-mobile").unwrap(); // remove original '.item' divs
$("#pe_recent_posts-4 .pe-item-mobile:first-of-type").addClass('active'); // add class active for the first item
if (peRecentPostscarouselContainer.children('.carousel-indicators').length > 0) { //only if indicators (bullets) are enabled
const peRecentPostsItemsNumber = $('.pe-item-mobile').length; // get numer of items
$(peRecentPostsIndicators.parent('ol')).empty(); // remove indicators (bullets) items
for (i = 0; i < peRecentPostsItemsNumber; i++) { // add bullets for mobile
peRecentPostsIndicatorsContainer.append('
' + i + '');
}
$(peRecentPostsIndicatorsContainer).children('li:first-child').addClass('active'); // add class active for the first bullet
}
}
}
);