Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gridster.js add_widget hangs at page load #601

Open
Priyankasurya opened this issue Sep 4, 2018 · 0 comments
Open

Gridster.js add_widget hangs at page load #601

Priyankasurya opened this issue Sep 4, 2018 · 0 comments

Comments

@Priyankasurya
Copy link

I'm using Gridster ( v0.7.0 - 2017-03-27 ) for my web site, and i need to add lot of widgets with "add_widget" command. While adding multiple gridster instances on the same page, page loads forever or hang during page load. Tested it on both Chrome & Firefox browser and issue exits.

Tried the solution provided here: #166 But it does't work.

Any ideas how to fix this problem?

Here's my code:

var gridster = [];

for(i=0; i<=5 ; i++){
gridster[i]=$(".gridster ul.grid"+i).gridster({
widget_base_dimensions: [5, 5],
widget_margins: [5, 5],
shift_widgets_up: false,
shift_larger_widgets_down: false,
collision: {
wait_for_mouseup: true
},
avoid_overlapped_widgets: true
}).data('gridster');

$.each(widgets[i], function (j, widget) {
     gridster[i].add_widget.apply(gridster[i], widget)   
});       

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant