Topic: embedding with a header

hi,

i just bought juicebox pro a few days ago and like to embed a resizeable gallery into an existing page with a header,
which works fine with setting the height at 90%, except of the little problem, that on an iPad, using the large screen mode,
the thumbnails aren't visible at first. i saw your example in your guide with a top menu and you wrote that you were using jquery.
is it possible to explain how you did that, or to give me something like a code example that i can adapt.

thanks martin

Re: embedding with a header

For reference, the Embedding Multiple Galleries support section can be found here.
You can view the source of the sample web pages in a browser and copy/modify them to suit your needs.

As an example, if you wanted a web page with a fixed height header and a gallery which takes up the remainder of the available space in the user's browser window, try the following as your gallery's 'index.html' page.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Juicebox Gallery</title>
    <script type="text/javascript" src="jbcore/juicebox.js"></script>
    <style type="text/css">
        html, body { height: 100%; overflow: hidden; }
        body {            
          margin: 0;
          padding: 0;
          background-color: #222;
          color: #666;
          font-family: sans-serif;
          font-size: 20px;        
        }
        #header {
          text-align: center;
          background-color: #333;
          width: 100%;
          height: 20px;
          padding: 10px 0;
        }
        #juicebox-content {
          width: 100%;
        }    
    </style>
    <script type="text/javascript">
    function doLayout() {
        var winHeight, footerHeight;
        winHeight = window.innerHeight ? window.innerHeight : $(window).height();
        headerHeight = $('#header').outerHeight();
        var newH = parseInt(winHeight) - parseInt(headerHeight);
        $('#juicebox-content').height(newH);
    }
    $(document).ready(function () {
        doLayout();
        $(window).bind('resize', doLayout);
        new juicebox({
            containerid: 'juicebox-container'
        });
    });
    </script>
</head>
<body>
    <div id="header">
        <span>Header content goes here</span>
    </div>
    <div id="juicebox-content">
        <div id="juicebox-container"></div>
    </div>
</body>
</html>

Re: embedding with a header

hi steven,

and thanks for your again quick reply.
i will try and play with that code.

martin