Page 1 of 1

Web Interface Responding to Control Bar Button

PostPosted: Sun Jan 08, 2017 9:53 pm
by RoryG
Hi,

I've used a Bootstrap template for my tour and customised the CSS and menu bar to fit my theme. I'm happy with the way it looks but I would like the HTML to respond to the hide controls icon to collapse the menu bar. I've written the code to show/hide the menu bar but have no idea how I can trigger it from inside the tour, likely a JavaScript function or editing the XML required? Anyone done this?

Cheers,

Rory

Re: Web Interface Responding to Control Bar Button

PostPosted: Mon Jan 09, 2017 10:12 am
by oblanc
Hello
You need to show/hide navigation bar and adjust #panoDIV accordingly

To hide navbar
Code: Select all
jQuery('nav.navbar').hide();
jQuery('#panoDIV').height('100%');


To show navbar
Code: Select all
jQuery('nav.navbar').show();
var finalHeight = jQuery(window).height() - jQuery('nav.navbar').height();
jQuery('#panoDIV').height(finalHeight);


Hope it helps