Add complex link to X Theme Pro Button

Hi guys,

I’m trying to get my button to open up a modal revolution slider. The HTML for he link is

<a href="#" onclick="document.dispatchEvent(new Event('RS_OPENMODAL_slider-alias-here')); return false">Open the Modal Slider!</a>

But if I add this (or a fragment of it, of course) to the button, it is always misread. How can I do this?

All the best,

Jont

Hi Jont,

What you can do is you can assign an ID to the button element then write a custom Javascript for the click event of the button.

For example:

Then add this to the page’s JS panel:


document.getElementById('the-button').onclick = function(){
  document.dispatchEvent(new Event('RS_OPENMODAL_slider-alias-here')); 
  
  return false;
};

Hope this helps.

Cool, thanks! I eventually found a different solution all together (don’t need the slider anymore), but thanks for thinking with me!

You’re welcome, Jont.

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