<div class="car-selection" id="wrapper">
<p class="fleet" data-position="1050">луна</p>
<p class="fleet" data-position="2100">Солнце</p>
<p class="fleet" data-position="0">seas</p>
</div>
document.querySelectorAll('.fleet').forEach(fleet => {
fleet.addEventListener('click', function () {
sliderLine.style.left = -this.dataset.position + 'px';
});
});
$(this).closest('.t-item__inner').toggleClass('in');
let ids = [...document.querySelectorAll('#myTable tr')].map(x => x.id);
// или
let ids = $('#myTable tr').map(function () {return this.id;})).get();
function createSelectBrands(brands){
let select = document.createElement('select');
let html = '<option>Выбрать бренд из списка</option>';
brands.forEach(brand => {
html += `<option value="${brand.key}">${brand.name}</option>`;
});
select.innerHTML = html;
return select;
}