Skip to content

Instantly share code, notes, and snippets.

@flyingoctopus
Created December 13, 2012 10:58
Show Gist options
  • Save flyingoctopus/4275717 to your computer and use it in GitHub Desktop.
Save flyingoctopus/4275717 to your computer and use it in GitHub Desktop.
gridster + coffeescript + backbone data binding issue
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
@neebz
Copy link

neebz commented Oct 18, 2013

shouldn't it be like :

    @gridster.data 'gridster'

?

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