gridstack.js issue base
Use this as a base for examples for gridstack.js issues.
by Alain Dumesny
HTML
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gridstack-h5.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/gridstack.min.css">
<div class="grid-stack"></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: true,
cellHeight: 12,
margin: 2
};
var grid = GridStack.init(options);
var count = 0;
grid.load([
{x: 0, y: 0, w: 2, h: 6, content: '1'},
{x: 2, y: 0, w: 2, h: 6, content: '2'},
{x: 4, y: 0, w: 2, h: 6, content: '3'},
]);