Responsive hype object not working in bootstrap modal

(raph) #1


I am wondering if anyone could help solve this problem. I have a hype file set to scale responsively, however I am using this hype file inside a bootstrap modal window. When the modal displays, the hype file is invisible until the browser window is resized slightly. You can see the problem at the below link, if you let the page load then click ‘Preparing for study’ then resize the browser window.

I have tried resizing the modal window after it is displayed via javascript, to see if this would trigger the object to appear, however this has not helped.

Hype file and bootstrap code are both attached. Thanks all! (2.0 MB)

(Hans-Gerd Claßen) #2

try to edit your modal code like this:

    $('#modal-preparing').on('', function (e) {
         $(".respondy").css("width", "800px");
         $(".respondy").css("height", "600px");
             $('iframe').contents().find('video').each(function () 

explanation is here:

to make a more robust setup you can also use hypes event callback system:

(raph) #3

Wonderful! Thank you! :grinning:

(stephane wagner) #4

Hello, have the same problem but cannot invoke relayoutNecessary function … seems to call an typeError as function is not recognised by the navigator !

I first click on a call to action that open a modal contain the HYPE file.js

(Jonathan Deutsch) #5

I’d guess you are either calling too soon (before the hype document has loaded) or you are not using the correct reference to the hype document object. It’d be helpful to see your code, preferably as a zip of your .hype document to know what you’re trying to do.