JSFiddle - React, Tailwind, and code Playground

by kaljak

HTML

<script src="https://miromannino.github.io/Justified-Gallery/bower_components/justified-gallery/dist/js/jquery.justifiedGallery.min.js"></script>
<link rel="stylesheet" href="https://miromannino.github.io/Justified-Gallery/bower_components/justified-gallery/dist/css/justifiedGallery.css">
<div id="basicExample">
    <div>
        <img alt="caption for image 1" src="http://placehold.it/350x150.png"/>
    </div>
    <div>
        <img alt="caption for image 2" src="http://placehold.it/350x150.png"/>
    </div>
    <div class="placeholder">
        <div>Test</div>
    </div>
</div>
<button onclick="destroy()">DESTROY</button>

CSS

.placeholder {
  width: 100px;
  height: 100px;
  background-color: red !important;
}

JavaScript

$("#basicExample").justifiedGallery();

window.destroy = function () {
	$("#basicExample").justifiedGallery("destroy");
}