gnab/remark — pull request #22 by gureckis (2012-08-30 23:47:40+00:00)
Title: Let the user add extra setup to slides

Let's see, my first attempt at a pull request on github... and it is one line of code (starting to understand things)!

In addition to the idea in [issue #10](https://github.com/gnab/remark/pull/10) which lets the user run some custom code when a slide appears (or hides), it may also be useful to execute some code after remark has been initialized. One example, for me, was that I wanted to programmatically add some styling to all the slides (e.g., insert a div into all the slides which contains a logo).

This pull request just adds a "remarkReady" event which is emitted after remark finishes setting up.

This can be used following [kjbekkelund](https://github.com/kjbekkelund)'s approach like this:

```
var remark = this.remark;

$(document).ready(function () {
remark.addListener("remarkReady", function() {
// do some set up (such as apply additional styling to all slides)
// for example using d3.js (https://github.com/mbostock/d3)
// d3.selectAll(".slide").append("div").attr("class","lablogo").html("hi");
});
});
```