Skip to content

Commit 4ac1422

Browse files
committed
fixed migrate 1.x info
1 parent 0c06ccb commit 4ac1422

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ var grid = $('.grid-stack').data('gridstack');
326326
var grid = GridStack.init(opts?, element?);
327327

328328
// returns DOM element
329-
grid.addWidget('<div><div class="grid-stack-item-content"> test </div></div>', {w: 2});
329+
grid.addWidget('<div><div class="grid-stack-item-content"> test </div></div>', {width: 2});
330+
// Note: in 3.x it's ever simpler
331+
// grid.addWidget({w:2, content: 'test'})
330332

331333
// event handler
332334
grid.on('added', function(e, items) {/* items contains info */});

0 commit comments

Comments
 (0)