$("form").find('.success').css('display': 'block')
document.getElementById('overlay').style='visibility:hidden;opacity:0;transition:all 0.7s ease-out 0s';
element.style.display = 'block';
const elementHeight = element.innerHeight;
element.style.display = 'none';
element.setAttribute('style', `--height:${height};`):
.element {
height: var(--height);
max-height: 300px;
}
const buttonNumber = document.querySelector('.number');
const block = document.querySelector('.block');
let counter = 0;
buttonNumber.addEventListener('click', event => {
event.preventDefault();
const newClass = 'block';
block.classList.add(newClass+counter);
counter++;
})
localStorage.getItem('value')
var test = function() {
console.log('yes')
}
function view() {
if( window.jQuery ) {
test()
} else {
setTimeout(function() {
console.log('not')
view(test)
}, 50)
}
}
view(test)
dropdown(event) {
event.preventDefault();
let target = event.currentTarget;
this.dropdownCloseOther(target.parentNode);
let dropdown = target.parentNode.querySelector('.custom-select-dropdown');
dropdown.classList.toggle('active');
}
dropdownCloseOther(not) {
let isActive = false;
if( not.querySelector('.custom-select-dropdown').classList.contains('active') ) isActive = true;
let dropdowns = document.querySelectorAll('.custom-select-dropdown.active');
dropdowns.forEach(dropdown => {
dropdown.classList.remove('active');
})
if( isActive ) not.querySelector('.custom-select-dropdown').classList.add('active');
}
element.addEventListener('click', function(event) {
event.preventDefault();
let isValid = validation();
if(isValid ) table()
})
function validation() {
let valid = false;
var txt = "";
if (document.getElementById("pass_id").validity.tooLong) {
txt = "";
valid = true;
}
document.getElementById("error_id").innerHTML = txt;
return valid;
}
function table(){
var pass = document.getElementById('pass_id').value;
document.write(pass)
}
if ( '123' == event.detail.contactFormId ) {
location = 'http://example.com/';
}