Commit 90a6d06d authored by Pavel Reznikov's avatar Pavel Reznikov
Browse files

remove unnecessary margin from samples

parent 7bab2f9d
......@@ -25,7 +25,7 @@ Usage
## Basic usage
```html
<div class="grid-stack">
<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">
......@@ -36,17 +36,17 @@ Usage
data-gs-width="4" data-gs-height="4">
<div class="grid-stack-item-content"></div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
<script type="text/javascript">
$(function () {
var options = {
cell_height: 80,
vertical_margin: 10
};
$('.grid-stack').gridstack(options);
});
</script>
});
</script>
```
## Options
......@@ -84,49 +84,49 @@ Usage
Occurs when widgets change their position/size
```javascript
var serialize_widget_map = function (items) {
var serialize_widget_map = function (items) {
console.log(items);
};
};
$('.grid-stack').on('change', function (e, items) {
$('.grid-stack').on('change', function (e, items) {
serialize_widget_map(items);
});
});
```
### ondragstart(event, ui)
```javascript
$('.grid-stack').on('dragstart', function (event, ui) {
$('.grid-stack').on('dragstart', function (event, ui) {
var grid = this;
var element = event.target;
});
});
```
### ondragstop(event, ui)
```javascript
$('.grid-stack').on('dragstop', function (event, ui) {
$('.grid-stack').on('dragstop', function (event, ui) {
var grid = this;
var element = event.target;
});
});
```
### onresizestart(event, ui)
```javascript
$('.grid-stack').on('resizestart', function (event, ui) {
$('.grid-stack').on('resizestart', function (event, ui) {
var grid = this;
var element = event.target;
});
});
```
### onresizestop(event, ui)
```javascript
$('.grid-stack').on('resizestop', function (event, ui) {
$('.grid-stack').on('resizestop', function (event, ui) {
var grid = this;
var element = event.target;
});
});
```
......
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