This component allows to activate automatic lightbox.

In case of using this SDk on page with widget at the same time - should be specified as accurately as possible

Basic usage

1. Add script to your page:

<script src="https://<AccountName>"></script>

2. Initialize automatic modal component:

new nanorep.sdk.AutoModal({
  imageSelector: '.images'
<img src="//" width="500" class="images" alt="test image">



Type: String

Default: '.answer-body img[src]'

Specify CSS selector to match <img> that should use lightbox

new nanorep.sdk.AutoModal({
  imageSelector: 'img[alt="test image"]'
<img src="//" width="500" alt="another image">
<img src="//" width="500" alt="test image">