Created
January 5, 2012 21:24
-
-
Save nambrot/1567385 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
addModel: function (model, scroll) { | |
// remove the old model | |
var old = $(this.contentview).children(); | |
old.addClass('animated bounceOutLeft'); | |
window.setTimeout(function () { | |
old.removeClass('animated bounceOutLeft'); | |
old.remove(); | |
}, 1000); | |
// attach the new model | |
this.model = model; | |
// create the view | |
this.subview = new model.view({model:model}); | |
$(this.contentview).append(this.subview.el); | |
$(this.subview.el).addClass('animated bounceInLeft'); | |
$(this.el).animate({scrollTop: scroll}, 1000); | |
this.subview.trigger('appended'); | |
// close the fullscreen if its open | |
if (a.fullscreenviewer) | |
a.fullscreenviewer.close(); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment