External button that can trigger the sliding popup which lists reviews

1 Like

Hello there, @Savvas_Savvas_Kyriak :waving_hand:

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 :blush:

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

1 Like

Awesome, thanks!

I’ve forwarded your request to the devs and will update you once it’s completed :wink:

Thank you so much @Max, I appreciate it!

1 Like

Hi @Savvas_Savvas_Kyriak :waving_hand:

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 :wink:

@Max Works perfectly! Thank you so much for your help.

1 Like

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! :wrapped_gift:

Check the details and join in :wink: