diff options
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js index 4574e25..9e52b5f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -492,8 +492,13 @@ var Reveal = (function(){ var node = nodes[i]; if( node.textContent && !node.querySelector( 'img' ) && ( !node.className || !node.classList.contains( node, 'roll' ) ) ) { + var span = document.createElement('span'); + span.setAttribute('data-title', node.text); + span.innerHTML = node.innerHTML; + node.classList.add( 'roll' ); - node.innerHTML = '<span data-title="'+ node.text +'">' + node.innerHTML + '</span>'; + node.innerHTML = ''; + node.appendChild(span); } } } |