Events

Ricerca fire JS events, in some scenarios. Events are provided in strategic code locations. This gives you the ability to listen for any changes and perform your own actions.

document.addEventListener("ricAddProductToCart",function(e){
let detail = e.detail;
let id = detail.id;
let title= detail.title;
let term= detail.term;
});
document.addEventListener("ricModalLoaded",function(e){
let detail = e.detail;
let term= detail.term;
});
document.addEventListener("ricModalClosed",function(e){
let detail = e.detail;
let layout= detail.layout;
});
document.addEventListener("ricTermNotFound",function(e){
let detail = e.detail;
let term= detail.term;
});
document.addEventListener("ricTermFound",function(e){
let detail = e.detail;
let term= detail.term;
});
document.addEventListener("ricClickFromSearchResults",function(e){
let detail = e.detail;
});
document.addEventListener("ricPurchased",function(e){
let detail = e.detail;
});