- Home /
Question by
Nonius · Feb 17, 2021 at 04:22 PM ·
javascriptwebglpopupbrowser communication
Open in link in lightbox/colorbox from webgl
Hi,
We manage to open a link in a new tab from unity through the use of jslib:
var OpenWindowPlugin = {
openWindow: function(link)
{
var url = Pointer_stringify(link);
document.onmouseup = function()
{
window.open(url);
document.onmouseup = null;
}
}
};
mergeInto(LibraryManager.library, OpenWindowPlugin);
We need to open viimeo movies in a lighbox/colorbox though, instead of a new tab.
Any suggestions? we put the following instead of window.open :
$.colorbox({iframe: true, href: elementURL, innerWidth: 645, innerHeight: 509});
But we get an error in the browser saying reference $ is not defined.
Any helping hands on this, seamingly, easy challenge?
thnx
sven
image.png
(25.8 kB)
Comment
Your answer
Follow this Question
Related Questions
Unity WebGL calling a function from a jslib file in JavaScript(Vue) 0 Answers
I can't get browser to Webgl communciation working 2 Answers
WebGL: Interacting with browser scripting unable to call java script method from C# 2 Answers
Interact across browser javascipt and unity webgl 2 Answers
How to send a large string from Javascript to WebGL ? 0 Answers