Skip to content

Instantly share code, notes, and snippets.

@bullfight
Created February 13, 2012 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bullfight/1821304 to your computer and use it in GitHub Desktop.
Save bullfight/1821304 to your computer and use it in GitHub Desktop.
class LessonShow
constructor: (@selector) ->
$.ajax
url: $(@selector).data('json-url')
cache: false
dataType: 'json'
success: @success
complete: @complete
success: (object) =>
# Render Lesson JSON with Handlebars template
template = JST['templates/lessons/show']
$('.lesson').append(template(object))
sublimevideo.ready ->
sublimevideo.prepareAndPlay $("video")[0]
complete: =>
sublimevideo.load()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment