Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

In case you need to communicate some important information to your customers, you can add a disclaimer/pop-up message. The pop-up will appear when a website visitor clicks the entry point button, after that the Visualizer is being launched.

First step

First, you need to add the script below on the page, where you want to place the pop-up:

<script src="//cdn.jsdelivr.net/npm/sweetalert2@10"></script>

You can add it whenever you want (but in the best way you can add it in the tag <head> of the page, where you want to add the pop-up).

 Then, add it into  <script> on your page:

<script>

 document.addEventListener('DOMContentLoaded', function(){

    document.getElementsByClassName("w-entry-point")[0].addEventListener(

      'click', showPopup, false

    );  

  });

  

  function showPopup(evt) {

    if(evt) {

      Swal.fire({

        icon: 'warning',

        title: 'Please note, patterns are based on a 108" high wall.',

        customClass: {

            container: 'my-swal'

        }

      })

    }

  }

</script>


Second step 

After adding the pop-up to your button, you need to create the pop-up/disclaimer itself.

Go to https://sweetalert2.github.io/ and check the instructions on how to create the pop-up you want.


  • No labels