Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<script type="application/javascript" src="https://d35so7k19vd0fx.cloudfront.net/production/integration/floating-button.min.js"></script>
<script>
    document.addEventListener("DOMContentLoaded", () => {
        const floatingButton = new window.WFloatingButton({
           token: "your token for wizart",
           element: document.getElementsByTagName("body")[0]
       });
       floatingButton.render({className: 'wizart-homepage'});
       
       $($('.class').find('a[href$="#visualizer"]')).click(function(e){
             e.preventDefault();
             $('.wizart-homepage').trigger('click'); 
      });
});
</script>

<style>
     .wizart-homepage {display: none!important;}
</style>

Info

 .class - this is a css class of your the custom button. For example in the screenshot you want to set a custom button to , if you’d like to place the custom button in the menu, so you you’ll need to find a parent <div> for your button.the button, like in the screenshot below:

Note

In another case, you can use any attribute: id, class, or another attribute for you the button parent for button.

If you want you’d like to use the button id of your button, please use #id instead of .class.

How it works? Click on the custom menu button and make a trigger to a real Wizart button.