<script src="https://cdn.jsdelivr.net/gh/rzwebs/clone-search@main/index.js"></script>
<script>
const searchCloner = new ElementCloner('input.t-search-widget__input');
searchCloner.cloneTo(['.newsearch', '.newsearch2']);
document.addEventListener('input', function(event) {
let sw = document.querySelectorAll('.t-search-widget__popup-container');
sw.forEach((elem) => {
elem.style.pointerEvents = 'all';
elem.style.visibility = 'visible';
})
})
document.addEventListener('click', function (event) {
let t = event.target;
console.log(t)
if (t.closest('#rec789749317 .t-container')) {
} else {
let sw = document.querySelectorAll('.t-search-widget__popup-container');
sw.forEach((elem) => {
elem.style.pointerEvents = 'none';
elem.style.visibility = 'hidden';
})
}
})
</script>
<style>
.t-search-widget__inputcontainer {
padding: 0px;
margin: 0px;
border: solid 1px;
}
.newsearch input.t-search-widget__input, .newsearch2 input.t-search-widget__input {
width: 100%;
height: 30px;
background-color: whitesmoke;
border-radius: 20px;
font-size: 12px;
}
.t-search-widget__popup-container {
visibility: visible;
background-color: white;
padding: 0px;
margin: 0px;
background-color: white;
padding: 0px;
margin: 0px;
box-shadow: 0px 20px 100px -50px black;
border-radius: 10px;
padding: 40px;
margin: 20px !important;
pointer-events: all;
}
.t-search-widget__popup.t-container {
margin-left: unset;
margin-right: unset;
max-width: unset;
}
.t-search-widget__popup {
display: flex;
align-items: flex-end;
}
#rec789749317 .t-container {
display: flex !important;
justify-content: center !important;
}
.t985__overlay {
visibility: hidden !important;
}
.t985__widgetheader {
display: none;
}
#rec789749317 {
z-index: 999999999999999999;
}
.t-search-widget__body-fix {
overflow: visible !important;
}
</style>