Button open off canvas modal not working

Hi team,

I’ve implemented this on another site with no problems, but for some reason, I can’t get it to work now. I’m trying to have buttons on my page open a single off canvas on the page. I’ve tried two different ways:

  1. the way i did on my previous site.
  • List item

I setup the off canvas modal and added a “toggle custom attribute” of data-x-toggle=“1”
on the button I added two custom atrributes: data-x-toggle=“1” and data-x-togglable=“e14-e10”

That didn’t work even though it works on my other site. So i searched the form and set it up just like this thread: Convert button click to open Off-Canvas

That also didn’t work. Can you please advise?

Note the off canvas modal is the white “buy now” in the opening section of the webpage. The button is the first button you encounter as you scroll down the page in the section “CTA Red/Green”

Thanks!

Ashley

ps. heres the inspection of the off canvas -

For some reason, it’s working now. I literally didn’t change anything.

I still have a question though. It’s working using the first method outlined above, which i what I was told by support to do when I was building the other website. But in the forum threads, it outlines the second method outlined above. Why are there two different ways? Is one better than the other? If so, why?

Thanks,
Ashley

Glad things started working, sounds like a cache thing or someone besides me fixed something.

I believe the results were two outcomes in those threads because the data-x-toggleable ID you are referencing changes depending on the Page ID and the ID of the element. It’s grabbed from looking at the HTML typically. Alternatively you can try to use the “Toggle Hash” on the off-canvas, and create links like #buy-now which would open your off-canvas. Let us know if this helps I was not 100% sure on what you were asking here. Have a great weekend.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.