Spinning Wheel reload and trigger on button click

  • Issue description:
    Hello, i have 2 Problems with the spinning wheel widget.

1.
I built a landigpage where i want to display the spinning wheel when someone clicks the Button. How can i set the trigger to the button on my website?

2.
i noticed that the spinning wheel isn’t loading after the widget was loaded already one time on the website. I i reload the page, the spinning wheel widget is not loading anymore.

Could you please help me? ists very urgent…

this is my widget: https://1ffef32257054be39559fac836ac94ed.elf.site

https://dash.elfsight.com/widget/1ffef322-5705-4be3-9559-fac836ac94ed

  • Link to the page with the widget in question:
1 Like

Hi there, @Emanuel_Rodriguez :wave:

  1. If you’d like to open the wheel once it was closed, you should enable the Reopen button on the Settings tab:

Or would you like the wheel popup to appear only on the button click, not on page load?

  1. If you’d like the wheel popup to appear on every page load, please add this code to the Custom JS field on the Settings tab of your widget’s settings:
const keyToDelete = "elfsight-spinning-wheel-1ffef322-5705-4be3-9559-fac836ac94ed";


if (sessionStorage.getItem(keyToDelete)) {
  sessionStorage.removeItem(keyToDelete); 
}

ookay thank you!

I want the wheel popup to appear only on the button click, not on page load.
Can you help me on that please?

1 Like

Sure, for this case we’ve added this code to the Custom JS field:

const key = "elfsight-spinning-wheel-1ffef322-5705-4be3-9559-fac836ac94ed";


sessionStorage.setItem(key, "shown");

Give it a try and let me know if it worked :wink: