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/';
}
if( $title[1] == date("Y") ):
if( dateParse($title[0]) == date("n") || dateParse($title[0]) == date("n",strtotime("+1 Months")) || dateParse($title[0]) == date("n",strtotime("+2 Months")) ):
?>
<a href="<?php the_permalink(); ?>" class="tabs__item <?php if( $theID == get_the_ID() ) { $title_month = dateParse($title[0]); echo 'active';} ?>" data-month="<?php echo dateParse($title[0]); ?>">
<span><?php echo $title[0]; ?></span>
</a>
<?php
endif;
endif;
imgs = []
$(".image").each(function(i) {
if($(this).css("background-image") != "none") {
imgs.push($(this).css("background-image"))
$(this).css("background-image", "none")
}
})
function combineCookie(value) {
for (let gIndex = 0; gIndex < value.length; gIndex++) {
const element = value[gIndex];
const { pageID } = element;
for (let lIndex = 0; lIndex < value.length; lIndex++) {
const _element = value[lIndex];
if (pageID === _element.pageID && gIndex !== lIndex) {
value[gIndex].amount = (parseInt(value[gIndex].amount) + parseInt(value[lIndex].amount)).toString();
const idx = value.indexOf(value[lIndex]);
if (idx !== -1) {
value.splice(idx, 1);
}
}
}
}
return value
}