Skip to content

Instantly share code, notes, and snippets.

@vieron
Created July 17, 2012 14:58
Show Gist options
  • Select an option

  • Save vieron/3129893 to your computer and use it in GitHub Desktop.

Select an option

Save vieron/3129893 to your computer and use it in GitHub Desktop.
Remove widget from the grid
gridster.remove_widget( $('.gridster li').eq(3) );
@krushnatkhawale
Copy link
Copy Markdown

Uncaught TypeError: Cannot set property 'width' of undefined

This is the error, when I used above line of code.
After trial and error I figured it out it was giving this error because there only widgets less than 3.

I tried adding multiple( at least 9 widgets) and removing one by one, and yeah, it worked perfectly
until there exist 3. When no of widgets are 3, and removing the widget given above error, Even though
there was 3 widgets.
I'm just curious, How does this method work gays?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment