Developers

Component Modal

Create a modal window with a component inside. See available components here.

Note

The modal window is closed at the beginning. Use the open function to open it.

Usage

How to create this component:

sdk.componentModal(componentName:String, options:Object, headerText:String);

Target

This is the HTML component. For example, the "#inbenta" target is:

<div id="inbenta"></div>

Options

Available options of the component, that we will print inside.

headerText

This is the modal window's header text. By default, there is no text.

Methods

You can use methods in this component:

Name Description
open() Open the modal window.
close() Close the modal window.

Example

Open a modal window with popular content inside.

<button onclick="openModal()">Open popular modal window</button>
<script type="text/javascript">
  var modal = sdk.componentModal('popular',{},'POPULARS');
  function openModal(){
    modal.open();
  }
</script>