diff --git a/lib/Viewer.js b/lib/Viewer.js index a3d916d9..71d207d6 100644 --- a/lib/Viewer.js +++ b/lib/Viewer.js @@ -365,7 +365,7 @@ Viewer.prototype.attachTo = function(parentNode) { this.detach(); // unwrap jQuery if provided - if (parentNode.get) { + if (parentNode.get && parentNode.constructor.prototype.jquery) { parentNode = parentNode.get(0); }