slara / generator-reveal

Yeoman generator for Reveal.js
MIT License
429 stars 52 forks source link

Allow execution of inline scripts. #35

Closed MichielDeMey closed 10 years ago

MichielDeMey commented 10 years ago

This will allow <script class="live"></script> tags inside slides to execute their javascript. By default, they don't get executed when inserting them through Ajax calls.

janraasch commented 10 years ago

This is hacky and problematic, see http://stackoverflow.com/questions/1197575/can-scripts-be-inserted-with-innerhtml. (By the way, I admit the whole loading external html snippets thing is hacky, we should simply concat everything together as part of the (grunt) build step, but anyway...)

In general, embed your js as external .js files and use reveal.js events like slide-changed to execute specific code on specific slides.

slara commented 10 years ago

I agree with @janraasch. reveal.js events should be used for this.

MichielDeMey commented 10 years ago

Ah, I didn't know about the Reveal events. Thanks for pointing me in the right direction!