erkyrath/glkote — pull request #3 by taradinoc (2014-12-17 02:37:51+00:00)
Title: Fix for some issues when the gameport is detached from the DOM

$('#foo') doesn't find elements that are detached, so e.g. the InvisibleCursor elements don't get removed when they should be. This changes it to $('#foo', parent_elem) in all instances but one. As long as the gameport is attached when GlkOte.init() is called, it can be detached and reattached later and still work reasonably well while detached.