Versions Compared

Key

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

...

Code Block
<script src="https://beta-static.ambita.com/infoland-componentsmflex/componentsInfoland.umd.js"></script>

Usage

Add the script tag to head and use the library after the dom is ready

Code Block
languagehtml
<!DOCTYPE html>
<html>
<head>
  <title>Page Title</title>
  <script src="https://beta-static.ambita.com/infoland-mflex/AmbitaInfoland.umd.js"></script>
</head>
<body>
  <div id="infoland"></div>
  <button id="button" click>Open Infoland</button>
  <script type="text/javascript">
    (() => {
      AmbitaInfoland.InfolandMFlex.init({
        ...
      });
      
      const button = document.getElementById("button");
      
      button.addEventListener('click', (e) => {
        AmbitaInfoland.InfolandMFlex.load({
          ...
        });
      });
    })();
  </script>
</body>
</html>

...