mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 01:00:05 +00:00
fixed how the GridStack object is obtained
jQuery plugins return the jQuery object, to get the plugin, also in the case of GridStack 0.2.6 (latest) you use the data() method with the correct name
This commit is contained in:
@@ -10,7 +10,11 @@
|
||||
var options = <IGridstackOptions> {
|
||||
float: true
|
||||
};
|
||||
var gridstack:GridStack = $(document).gridstack(options);
|
||||
var element: JQuery = $(document).gridstack(options);
|
||||
var gridstack: GridStack = $(document).data("gridstack");
|
||||
var gsFromElement: GridStack = element.data("gridstack");
|
||||
|
||||
if (gridstack !== gsFromElement) throw Error('These should match!');
|
||||
|
||||
gridstack.addWidget("test", 1, 2, 3, 4, true);
|
||||
gridstack.batchUpdate();
|
||||
|
||||
Reference in New Issue
Block a user