{"issue":{"created_at":"2011-11-19T18:28:02Z","state":"open","updated_at":"2011-11-19T21:53:37Z","user":{"gravatar_id":"6c51c14716e24bc1f1a3fb5ad234e773","id":5259,"url":"https://api.github.com/users/kjbekkelund","login":"kjbekkelund","avatar_url":"https://secure.gravatar.com/avatar/6c51c14716e24bc1f1a3fb5ad234e773?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":2,"body":"I needed an event to fire when slides where shown, so I implemented a simple event support. Here's an example of using this support:\r\n\r\n      var remark = this.remark;\r\n      $(document).ready(function() {\r\n        remark.events.addListener(\"slide\", function() {\r\n          // do JavaScript stuff that relates to the slide\r\n        });\r\n      });\r\n\r\nThis can be extended throughout remark, so a lot of cool stuff can be done in JS when presenting. What I'm using it for right now is looking for a `code` tag with a `coffeescript` class on the slide, and enable running the CoffeeScript right there (making a presentation on CoffeeScript and SASS).","assignee":null,"id":2289272,"pull_request":{"patch_url":"https://github.com/gnab/remark/pull/10.patch","html_url":"https://github.com/gnab/remark/pull/10","diff_url":"https://github.com/gnab/remark/pull/10.diff"},"number":10,"labels":[],"title":"Initial event support","closed_at":null,"html_url":"https://github.com/gnab/remark/issues/10","milestone":null,"url":"https://api.github.com/repos/gnab/remark/issues/10"},"action":"created","comment":{"created_at":"2011-11-19T21:53:37Z","updated_at":"2011-11-19T21:53:37Z","user":{"gravatar_id":"6c51c14716e24bc1f1a3fb5ad234e773","id":5259,"url":"https://api.github.com/users/kjbekkelund","login":"kjbekkelund","avatar_url":"https://secure.gravatar.com/avatar/6c51c14716e24bc1f1a3fb5ad234e773?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Absolutely, that would be sweet. I'm still not sure, however, what's the best input. Both the DOM element of the new slide and the slide number might be interesting. Maybe we could start with\r\n\r\n        remark.events.emit('slide', slide, slideIndex);\r\n\r\nand just see if that's enough (or if they are even needed).\r\n\r\nShould we change the name? \"newslide\"? \"changeslide\"? Or just keep it at \"slide\" for now?","id":2801129,"url":"https://api.github.com/repos/gnab/remark/issues/comments/2801129"}}