wait for the sample code to be fully loaded before loading run_prettify....

Because prettify and example code are loaded asynchronously, the syntax highlighting fails sometime (when prettify loads faster)
This pull request loads prettify only after the example is fully loaded and the code added to the dom.