Commit 0562206b authored by Pavel Reznikov's avatar Pavel Reznikov
Browse files

base usage section

parent 45446374
......@@ -24,6 +24,25 @@ Usage
Coming soon...
## Basic usage
```html
<div class="grid-stack">
<div class="grid-stack-item" data-gs-x="0" data-gs-y="0" data-gs-width="4" data-gs-height="2"><div class="grid-stack-item-content"></div></div>
<div class="grid-stack-item" data-gs-x="4" data-gs-y="0" data-gs-width="4" data-gs-height="4"><div class="grid-stack-item-content"></div></div>
</div>
<script type="text/javascript">
$(function () {
var options = {
cell_height: 80,
vertical_margin: 10
};
$('.grid-stack).gridstack(options);
});
</script>
```
## Options
- `width` - amount of columns (default: 12)
......@@ -35,6 +54,10 @@ Coming soon...
- `auto` - if `false` it tells to do not initialize existing items (default: true)
- `min_width` - minimal width. If window width is less grid will be shown in one-column mode (default: 768)
## Grid attributes
- `data-gs-width` - grid width
## Item attributes
- `data-gs-x`, `data-gs-y` - element position
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment