Make an entire scene invisible/display false


#1

Can anybody help with this?

I want to make a hype/html widget in iBooks invisible/transparent using javascript

TIA


(Mark Hunte) #2

I have not used iBooks but.

have you tried element.style.display = “none” and “block”


(Mark Hunte) #3

I just did a test and it does work.

I added a js function that is called on scene load.

Because we are calling at scene load the calling element is the scene element.

So we can simply do something like this.

element.style.display =  "none"
	
	 
	
	setTimeout(function(){ 
	 
		element.style.display  = "block" 
	
	}, 10000);

I put a timer in there so the scene would come back after 10 seconds.

Note that doing this only affects the internal scene of the widget. It does not hide the widget or it’s space since that is controlled by iBooks.


#4

Thanks for the help. Much appreciated.