JavaScript Event for Recipe Rating
JavaScript Event for Recipe Rating
Recipe Kit emits a JavaScript event when a customer rates a recipe. You can use this to trigger custom actions on your site.
Listening for Rating Events
Add this code to your theme's JavaScript:
document.addEventListener('rk_rating_event', function (e) {
console.log('Recipe Kit rating submitted');
// Add your custom logic here, like:
// - Show a thank you message
// - Display confetti animation
// - Trigger a popup or email signup
}, false);
Event Details
The event fires immediately after a customer submits a rating on any recipe card.
What's Next?
- Recipe Ratings - Configure rating display
- Custom CSS Styling - Style the rating stars