Created
December 13, 2012 11:24
-
-
Save flyingoctopus/4275840 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="container"> | |
<ul> | |
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1"></li> | |
<li data-row="1" data-col="2" data-sizex="1" data-sizey="1"></li> | |
<li data-row="1" data-col="3" data-sizex="1" data-sizey="1"></li> | |
<li data-row="1" data-col="4" data-sizex="1" data-sizey="1"></li> | |
<li data-row="1" data-col="5" data-sizex="1" data-sizey="1"></li> | |
</ul> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Namespace.Views.View extends Backbone.View | |
gridster: null | |
initialize: -> | |
@render() | |
render: => | |
$(@el).html JST['templates/page'](key: 'value') | |
@loadGridster() | |
this | |
loadGridster: => | |
@gridster = @$("#container ul").gridster({ | |
widget_margins: [10, 10], | |
widget_base_dimensions: [140, 80], | |
min_cols: 5, | |
min_rows: 1, | |
}) | |
@gridster.data 'Namespace.Views.View.gridster' | |
console.log @gridster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment