$('input').on('input', function() {
$(this).val($(this).val().replace(/[A-Za-zА-Яа-яЁё,.]/, ''));
});
section{
position: fixed;
top: 0;
width: 100%;
height: 100vh;
transition-delay: 0.3s;
transition: backdrop-filter 0.5s;
animation-name: menu;
animation-duration: 1s;
animation-delay: 1s;
animation-fill-mode: forwards;
}
.blur{
position: fixed;
backdrop-filter: blur(5px) brightness(60%);
animation-name: menu;
animation-duration: 1s;
animation-direction: reverse;
animation-fill-mode: forwards;
}
@keyframes menu {
0%{transform: translateX(0);}
100%{transform: translateX(-101%);}
}
<a class="menu-itemlanguage" href="ru.html">
<label class="menu-btn" for="menu-toggle">
RU
</label>
</a>
<br>
- это устарело 100 лет назад. $(document).on('click', '.counter__minus', function() {
const parent = $(this).closest('.counter');
let count = +parent.find('input').val() - 1;
if (count <= 10) count = 10;
parent.find('input').val(count);
return
});
$(document).on('click', '.counter__plus', function() {
const parent = $(this).closest('.counter');
let count = +parent.find('input').val() + 1;
if (count <= 10) count = 10;
parent.find('input').val(count);
return
});
$(document).on('click', '.counter__count input', function() {
const parent = $(this).closest('.counter');
let count = +$(this).val();
if (count < 10 || !isNumeric(count)) {
parent.find('input').val(10)
}
return
});
background: url("data:image/svg+xml, --- --- --- ") center no-repeat;
background: url("data:image/svg+xml, --- --- --- ") center no-repeat,
url("data:image/svg+xml, --- --- --- ") center no-repeat,
url("data:image/svg+xml, --- --- --- ") center no-repeat;
const arr = [
{
value: 'aaa'
},
{
value: 'bbb'
},
{
value: 'ccc'
},
{
value: 'ddd'
},
]
let arr2 = [];
arr.forEach(el => {
arr2.push(el.value)
})
console.log(arr2)