-
Issue description: I’d replace the default badge with a regular button which I will add myself on the page and when that’s clicked it will toggle the elfsight sliding popup with reviews?
-
Link to the page with the widget in question: Garage Door Repair and Installation in Asheville| Hometown Garage Door
Hello there, @Savvas_Savvas_Kyriak ![]()
Yep, it’s possible to customize the widget this way. For this, the custom button on your website should have a unique ID.
Please send me a screenshot of the button you’d like to use (once you add it to the website) and I’ll pass your request to the devs ![]()
OK, please use this page where I’ve added the “Reviews” button Garage Door Repair and Installation in Asheville| Hometown Garage Door
The element I want to use has id=element-1535
Awesome, thanks!
I’ve forwarded your request to the devs and will update you once it’s completed ![]()
Thank you so much @Max, I appreciate it!
We’ve used this code in the Custom CSS section on the Style tab of your widget’s settings to hide the review badge:
.es-badge-container {
display: none;
}
We’ve also added this script to the Custom JS section on the Settings tab of your widget’s settings to trigger the review panel on the button click:
const BUTTON_SELECTOR = '#element-1535 .btn';
const button = document.querySelector(BUTTON_SELECTOR);
if (!button) {
return;
}
button.addEventListener('click', () => {
const badge = document.querySelector('.es-card-badge-container');
if (!badge) {
return;
}
badge.click();
});
Please check your website and let me know if you like the result ![]()
@Max Works perfectly! Thank you so much for your help.
Great, you’re very welcome!
In the meantime, we’d like to invite you to participate in our new contest, where you can win a 6-month extension for your subscription - February Contest: Guess What’s Missing in Our Photo and Win 6 Months FREE! ![]()
Check the details and join in ![]()