forked from LiveCarta/LiveCartaWP
@@ -53,25 +53,27 @@ window.addEventListener('DOMContentLoaded', function(){
|
||||
|
||||
// catalog
|
||||
|
||||
const catalogSearchBtn = document.getElementById('catalogSearchBtn');
|
||||
const catalogSearchInput = document.getElementById('catalogSearchInput');
|
||||
const catalogSearchClear = document.getElementById('catalogSearchClear');
|
||||
if (document.getElementById('catalogSearchBtn')) {
|
||||
const catalogSearchBtn = document.getElementById('catalogSearchBtn');
|
||||
const catalogSearchInput = document.getElementById('catalogSearchInput');
|
||||
const catalogSearchClear = document.getElementById('catalogSearchClear');
|
||||
|
||||
catalogSearchBtn.addEventListener('click', function(){
|
||||
let searchText = catalogSearchInput.value;
|
||||
top.location = 'https://app.livecarta.com/catalog?tab=books-tab&search=' + searchText;
|
||||
})
|
||||
|
||||
catalogSearchClear.addEventListener('click', function(){
|
||||
catalogSearchInput.value = '';
|
||||
})
|
||||
|
||||
catalogSearchInput.addEventListener('keyup', function(e){
|
||||
if (e.keyCode === 13) {
|
||||
catalogSearchBtn.addEventListener('click', function(){
|
||||
let searchText = catalogSearchInput.value;
|
||||
top.location = 'https://app.livecarta.com/catalog?tab=books-tab&search=' + searchText;
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
catalogSearchClear.addEventListener('click', function(){
|
||||
catalogSearchInput.value = '';
|
||||
})
|
||||
|
||||
catalogSearchInput.addEventListener('keyup', function(e){
|
||||
if (e.keyCode === 13) {
|
||||
let searchText = catalogSearchInput.value;
|
||||
top.location = 'https://app.livecarta.com/catalog?tab=books-tab&search=' + searchText;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// sliders
|
||||
|
||||
|
||||
Reference in New Issue
Block a user