forked from LiveCarta/LiveCartaWP
main page v3
This commit is contained in:
@@ -75,6 +75,23 @@ window.addEventListener('DOMContentLoaded', function(){
|
||||
})
|
||||
}
|
||||
|
||||
document.addEventListener('click', function(e){
|
||||
if (e.target.classList && e.target.closest('.catalogSearchBtn')) {
|
||||
let searchText = e.target.closest('.input-flex').querySelector('.catalogSearchInput').value;
|
||||
top.location = 'https://app.livecarta.com/catalog?tab=books-tab&search=' + searchText;
|
||||
}
|
||||
if (e.target.classList && e.target.closest('.catalogSearchClear')) {
|
||||
e.target.closest('.input-flex').querySelector('.catalogSearchInput').value = '';
|
||||
}
|
||||
})
|
||||
|
||||
document.addEventListener('keyup', function(e){
|
||||
if (e.keyCode === 13 && e.target.classList.contains('catalogSearchInput')) {
|
||||
let searchText = e.target.value;
|
||||
top.location = 'https://app.livecarta.com/catalog?tab=books-tab&search=' + searchText;
|
||||
}
|
||||
})
|
||||
|
||||
// sliders
|
||||
|
||||
if (document.querySelector('.catalog-slider')) {
|
||||
|
||||
Reference in New Issue
Block a user