neo4j-contrib/neo4j-org — pull request #178 by dylanpyle (2013-10-04 20:39:44+00:00)
Title: Fix Versal Course Player launching and sizing issues

Hi guys,

I took at the launching issues you were having with the Course Player - I think I found the culprit (the `append()` call). Karl Swedberg of jQuery explains it well:

> All of jQuery's insertion methods use a domManip function internally to clean/process elements before and after they are inserted into the DOM. One of the things the domManip function does is pull out any script elements about to be inserted and run them through an "evalScript routine" rather than inject them with the rest of the DOM fragment. It inserts the scripts separately, evaluates them, and then removes them from the DOM.

Basically, using `player.append(script)` to add the versal.js script wasn't actually injecting it in the right place - it was being added to the `head` instead. Using native methods solves this.

I also added in a tiny CSS rule in place of the previous 'resize' method - if you'd rather keep it dynamic I'm happy to remove that.

Let me know if you have any questions!

Dylan