Skip to content

Instantly share code, notes, and snippets.

@JoshTheWanderer
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save JoshTheWanderer/9228055 to your computer and use it in GitHub Desktop.

Select an option

Save JoshTheWanderer/9228055 to your computer and use it in GitHub Desktop.
Marionette view transtions
# Hide the element, then fade in. defer prevents choppiness
onRender ->
@$el.hide()
_.defer _.bind @transitionIn, @
transitionIn: ->
@$el.slideDown()
# Override backbone remove method, then call it once we've finished the transition
remove: ->
parentRemove = _.bind ->
Backbone.View::remove.call @
, @
@$el.slideUp 400, parentRemove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment