function makeItem(title) {
return `<a class="dropdown-item"><i class="icon icon-line-circle"></i><span>${title}</span></a>`;
}
fetch('../russia.json')
.then(response => response.json())
.then(json => {
const itemsHtmlString = json.map(item => makeItem(item.city)).join()
$('.search__city .dropdown-menu').html(itemsHtmlString);
});
<div class="servers">
<p class="server-name">НМ</p>
<p class="server-name">???</p>
<img class="servers_image" src="content/nm11.png">
<img class="servers_image" src="content/dont_know.png">
</div>
.servers {
display: grid;
grid-template-columns: 1fr 1fr;
column-gap: 50px;
row-gap: 3em;
}
.server-name{
/* display: inline-block; */
/* width: 10px; */
/* position: relative; */
font-family: 'Roboto Slab', serif;
font-size: 30px;
/* position: relative; */
/* top: 25px; */
/* left: 85px; */
text-align: center;
}
.servers_image{
height: 300px;
/* width: 230px; */
border-radius: 35px;
/* margin-bottom: 3em; */
/* margin-right: 50px; */
}
.third__main-special{
display: flex;
- justify-content: space-between;
}
.third__main-special-body{
display: block;
- width: 964px;
+ flex-grow: 1;
}
Или плюс состоит лишь в том, что браузер, когда читает файл делая это сверху-вниз, сначала натыкается на "мобильные" стили?
self.classList.toggle('open');
const control = self.querySelector('.accordion__control');
const content = self.querySelector('.accordion__content');
.accordion__tittle.open
, а получаете вы .accordion__control
.// В браузере норм сработает и с пробелами. Просто оберните в тег ссылки.
$txtphone = trim($_POST['phone']);
$txtphone = "<a href='tel:$txtphone'>$txtphone</a>";
// Для телеги вырежьте все, кроме цифр
$phone = strip_tags($_POST['phone']);
$phone = preg_replace('/\D/', '', $phone);
$phone = '+'.$phone; // Плюсик вернем.
<div class="search">
<input class="search__input" type="text">
<button class="search__button" type="button">Go!</buton>
</div>
<script>
[...document.querySelectorAll('.search')].forEach(block => {
block.querySelector('.search__button').addEventListener('click', () => {
window.location.href = 'https://123.ru/' + block.querySelector('.search__input').value;
});
});
</script>