execute function when certain slide appear in reveal.js
问题 I create a presentation with this javascript framework http://lab.hakim.se/reveal-js/#/ and when certain slide is appearing I want to execute function stats(), which display some data from API every 5 seconds, but only when this slide is appearing function stats(){ $.ajax({ type: "GET", url: url_survey, dataType: "json", success : function (data) { //some code to display data }, error: //some code }); } in HTML file I have this: <section> <div id="stats"> </div> </section> how can I do it? I