Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
open-source
gridstack.js
Commits
0562206b
Commit
0562206b
authored
Nov 17, 2014
by
Pavel Reznikov
Browse files
base usage section
parent
45446374
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
0562206b
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment