myaccount()

My Account button

In order to place a My Account button on your website, start with including Cleeng JS library in of your website.

https://cdn.cleeng.com/js-api/3.0/api.js

In order to attach My Account trigger to any other DOM element or simply run it once page is loaded, use JS code listed below.

Once library is included, you can put My Account button on your website. There are 3 ways of module button implementation:

Overlay

<button
    data-cleeng-trigger
    data-action="my-account"
    data-display-type="overlay"
    data-publisher-id="your_publisher_id"
    data-completed-callback="cleengCallbackHandler(result)">
    My Account overflow
</button>

Inline

<button
    data-cleeng-trigger
    data-action="my-account"
    data-display-type="inline"
    data-container-id="my-account-container"
    data-publisher-id="your_publisher_id"
    data-completed-callback="cleengCallbackHandler(result)">
    My Account inline
</button>
<div id="my-account-container"></div>

Popup

<button
    data-cleeng-trigger
    data-action="my-account"
    data-display-type="popup"
    data-publisher-id="your_publisher_id"
    data-completed-callback="cleengCallbackHandler(result)">
    My Account popup
</button>

Example of overlay code:

My Account JS

In order to attach My Account trigger to any other DOM element or simply run it once page is loaded, use JS code listed below.

Example of overlay code:

<script>
  CleengApi.myAccount({
    displayType: "overlay",
    publisherId: "your_publisher_id",
    completed: function (result) {
      console.log(result);
    }
  });
</script>

Inline:

<script>
     CleengApi.myAccount({
       displayType: "inline",
       containerId: "my-account-container",
       publisherId: "your_publisher_id",
       completed: function (result) {
         console.log(result);
       }
     });
</script>
<div id="my-account-container"></div>