gridstack.js issue base

Use this as a base for examples for gridstack.js issues.

by Alain Dumesny

HTML

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/gridstack.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gridstack-all.js"></script>
<h1>gridstack.js base demo for issues</h1>
<p>Fork and modify me to demonstrate your issue when creating an issue for gridstack.js</p>
<div><a class="btn btn-default" onClick="addNewWidget()" href="#">Add Widget</a></div>
<br />

<div class="grid-stack">
  <div class="grid-stack-item" gs-w="12" gs-h="3">
  <div class="grid-stack-item-content">
      <div style="width: 150px; height: 150px;"     >
      Small square
      </div>
  
  </div>
  </div>
  <div class="grid-stack-item" gs-w="12" gs-h="3">
    <div class="grid-stack-item-content">
  <div style="width: 200px; height: 200px;"     >
       Bigger square
      </div>
  
  </div>
  </div>
  
</div>

CSS

.grid-stack {
  background: lightgoldenrodyellow;
}

.grid-stack-item-content {
  color: #2c3e50;
  text-align: center;
  background-color: #18bc9c;
}

JavaScript

var options = { // put in gridstack options here
  disableOneColumnMode: true, // for jfiddle small window size
  float: false,
  sizeToContent: true
};


setTimeout(() => {
var grid = GridStack.init(options);
}, [2000])