Wait for document to be ready before calling `displayEffect()`

Fixes https://github.com/Dogfalo/materialize/issues/133.