Permalink
Browse files

Transition between pages by fading

chapter14-3
  • Loading branch information...
tmeasday committed Dec 1, 2014
1 parent 4f57bf6 commit 70beaf727ab5e9c5b2b60a3c4e72974aa28668c3
Showing with 15 additions and 0 deletions.
  1. +15 −0 client/templates/application/layout.js
@@ -0,0 +1,15 @@
Template.layout.onRendered(function() {
this.find('#main')._uihooks = {
insertElement: function(node, next) {
$(node)
.hide()
.insertBefore(next)
.fadeIn();
},
removeElement: function(node) {
$(node).fadeOut(function() {
$(this).remove();
});
}
}
});

0 comments on commit 70beaf7

Please sign in to comment.