Skip to content

Commit

Permalink
Clone node on transition
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelage committed Nov 8, 2014
1 parent 76757d4 commit a4c77f5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions dist/js/ratchet.js
Expand Up @@ -256,12 +256,15 @@
// <div class="bar-nav"></div>
// <div class="contents"></div>
// </div>

var TRANSITION = function (contents, transition, complete) {

if(typeof(contents) === 'string' || contents instanceof String) {
var div = document.createElement('div');
div.innerHTML = contents;
contents = div.childNodes[0];
} else {
contents = contents.cloneNode(true)
}

if (transition) {
Expand Down

0 comments on commit a4c77f5

Please sign in to comment.