forked from LiveCarta/LiveCartaWP
scripts fix
This commit is contained in:
@@ -53,25 +53,27 @@ window.addEventListener('DOMContentLoaded', function(){
|
|||||||
|
|
||||||
// catalog
|
// catalog
|
||||||
|
|
||||||
const catalogSearchBtn = document.getElementById('catalogSearchBtn');
|
if (document.getElementById('catalogSearchBtn')) {
|
||||||
const catalogSearchInput = document.getElementById('catalogSearchInput');
|
const catalogSearchBtn = document.getElementById('catalogSearchBtn');
|
||||||
const catalogSearchClear = document.getElementById('catalogSearchClear');
|
const catalogSearchInput = document.getElementById('catalogSearchInput');
|
||||||
|
const catalogSearchClear = document.getElementById('catalogSearchClear');
|
||||||
|
|
||||||
catalogSearchBtn.addEventListener('click', function(){
|
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;
|
let searchText = catalogSearchInput.value;
|
||||||
top.location = 'https://app.livecarta.com/catalog?tab=books-tab&search=' + searchText;
|
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
|
// sliders
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user