function out() {
let input = document.querySelector('.input').value;
let result = document.querySelector('.out');
let name = {};
name.todo = input;
name.check = false;
let j = heaList.length;
heaList[j] = name;
let out = '', res = '';
for (let key in todoList) {
res += heaList[key].todo + '<br>';
res += todoList[key].todo + '<br>';
}
result.innerHTML = '<span>' + res + '</span><br>';
}
div{
width:100px;
height: 50px;
border: 2px dotted red;
border-radius: 50% 50% 0 0 / 100% 100% 0 0;
border-bottom:none;
position:relative;
color:red;
transition: 3s all ease;
transform-origin: 50% 100%;
}
div:after{
position:absolute;
content:'▼';
bottom:-10px;
right:-11px;
transform: rotate(-38deg);
}
div:before{
position:absolute;
content:'▼';
bottom:-10px;
left:-11px;
transform: rotate(38deg);
}
div:hover {
transform: rotateZ(360deg)
}
window.onload = () => {
const observer = new IntersectionObserver((entries, observer) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.className = 'Класс синего кружка';
observer.unobserve(entry.target);
}
})
}, { threshold: 0.5 })
document.querySelectorAll('Класс серого крцжка').forEach(item => observer.observe(item));
}
$('.form__modal').submit(function (e) {
var errorsForm = false;
var nameVal = $('input[name="userNameOneClick"]').val();
if (nameVal.length < 3) {
errorsForm = true;
$('[name=userNameOneClick]').css('border', 'red 1px solid');
} else {
$('[name=userNameOneClick]').css('border', 'rgba(0,0,0,0.15) 1px solid');
}
var phoneVal = $('[name=phone]').val().replace(/[^\d.]/ig, '');
if (phoneVal.length < 11) {
errorsForm = true;
$('[name=phone]').css('border', 'red 1px solid');
} else {
$('[name=phone]').css('border', 'rgba(0,0,0,0.15) 1px solid');
}
return !errorsForm;
});
var lines = $('.content.html_format').html().replace(/<br\/?>/g, "\n").split(/\n+/);
var new_text = $.map(lines, function(line) { if (line) return '<p>' + line + '</p>'; });
$('.content.html_format').html(new_text);
$('.content.html_format').html($('.content.html_format').html().replace(/<br\/?>\n/g, "\n").replace(/(.+)\n+/g, '<p>$1</p>\n');