// Добавление/удаление полей загрузки файлов
$(document).on('click', '.form__input-add', function(){
$('<div class="frm__lne form__line--input"><input class="form__input form__input--file" name="attach" type="file" id="attach-field"><a href="#" class="form__input-del">Удалить</a><a href="#" class="form__input-add">Добавить еще</a>').insertAfter('.form__line--input:last');
$('input[type=file].form__input--file').each(function(){
$(this).styler();
});
$('.form__input-add').each(function(i, item){
if($('.form__input-add').length > 1){
$(item).remove();
}
});
return false;
});
$(document).on('click', '.form__input-del',function () {
if ($('.form__line--input').length == 1) {
return false
}
$(this).parents('.form__line--input').remove();
if(!$('.form__input-add').length){
$('<a href="#" class="form__input-add">Добавить еще</a>').insertAfter('.form__input-del:last');
}
return false;
});
<div class="menu">
<div class="menu-item">...</div>
<div class="menu-item">...</div>
<div class="menu-item">...</div>
<div class="menu-item">...</div>
<div class="menu-item">...</div>
</div>
.menu {
display: flex;
justify-content: space-between;
}
.menu-item {
flex-basis: 15%;
}
.menu {
display: flex;
justify-content: space-between;
}
.menu-item:nth-child(n + 2) {
margin-left: 30px;
}
.menu {
text-align: justify;
text-justify: newspaper;
font-size: 0;
}
.menu:after {
content: "";
display: inline-block;
width: 100%;
}
.menu-item {
display: inline-block;
width: 15%;
font-size: 1rem;
}
for (var i = 0; i < title.length; i++) {
(function(i){
title[i].addEventListener('click', function (event) {
event.preventDefault();
text[i].classList.toggle('main_item--open');
});
})(i);
}
function isChild(child, parent) {
var current=child;
if(!child||!parent)return false;
if(child===parent)return true;
while (current = current.parentNode) {
if(current==parent)return true;
}
return false;
}
...
if(!isChild(event.target, popupElement)){
popup.close();
}
XMLHttpRequest cannot load 37.252.120.98/kadr/monitor. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'fiddle.jshell.net' is therefore not allowed access.