FitMix Developer Documentation

Basic

Example

HTML Code

<div id="tryOnArea"></div>
<button data-skunumber="259262" class="TryOn">259262</button>
<button data-skunumber="223065" class="TryOn">223065</button>
<button data-skunumber="177280" class="TryOn">177280</button>

Javascript Code

window.onload = function()
{
    var vFitMix = new Fb.FitMix(
        {
            container: '#tryOnArea',
            skunumber: '259262',
            customerid: 'showroom',
            FitPhoto:
            {
                backgroundbehavior: '100%'
            }
        }
    );
    
    var vElements = (document.querySelectorAll) ? 
        document.querySelectorAll('.TryOn') : 
        document.getElementsByClassName('TryOn') ;
    
    if(vElements)
    {
        for(i = 0;i < vElements.length;i++)
        {
            vElements[i].onclick = function()
            {
                vFitMix.SetFrame(this.getAttribute('data-skunumber'));
            }
        }
    }
}

CSS Code

#fittingbox-fitmix,
#fittingbox-fitmix #fittingbox-middle
{
/*    height: 500px !important;*/
    background-color: transparent !important;
    overflow: visible !important;
}

#fittingbox-fitmix #fittingbox-main:before
{
    content: "";
    padding-top: 58.5%;
    display: block;
}

#fittingbox-fitmix.fittingbox-fitmix #fitlive-container .actions > button,
#fittingbox-fitmix.fittingbox-fitmix #fitlive-container .actions > div,
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container .actions > button,
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container .actions > div,
#fittingbox-fitmix.fittingbox-fitmix #fitviewer-container .actions > button,
#fittingbox-fitmix.fittingbox-fitmix #fitviewer-container .actions > div,
#fittingbox-fitmix.fittingbox-fitmix button,
#fittingbox-fitmix.fittingbox-fitmix div.button,
#fittingbox-fitmix.fittingbox-fitmix #fittingbox-message > button,
#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share > a
{
    box-shadow: 0px 0px 10px #333333 !important;
    border: 1px solid white !important;
    border-radius: 0 !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share > a,
#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share > #face
{
    box-shadow: 0px 0px 10px #333333 !important;
    overflow: hidden !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share > #face
{
    padding: 0 !important;
    border: 1px solid white !important;
    background-color: white !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fitphoto div
{
    background-size: cover !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fitlive-container .actions > button,
#fittingbox-fitmix.fittingbox-fitmix #fitlive-container .actions > div,
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container .actions > button,
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container .actions > div,
#fittingbox-fitmix.fittingbox-fitmix #fitviewer-container .actions > button,
#fittingbox-fitmix.fittingbox-fitmix #fitviewer-container .actions > div
{
    width: 32px !important;
    height: 32px !important;
    background-position: center center !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fitlive-container .actions > button > span, 
#fittingbox-fitmix.fittingbox-fitmix #fitlive-container .actions > div > span, 
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container .actions > button > span, 
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container .actions > div > span, 
#fittingbox-fitmix.fittingbox-fitmix #fitviewer-container .actions > button > span, 
#fittingbox-fitmix.fittingbox-fitmix #fitviewer-container .actions > div > span
{
    display: none !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container .actions hr, 
#fittingbox-fitmix.fittingbox-fitmix #fitlive-container .actions hr, 
#fittingbox-fitmix.fittingbox-fitmix #fitviewer-container .actions hr
{
    width: 32px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    border-color: #FFFFFF !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fittingbox-main,
#fittingbox-fitmix.fittingbox-fitmix #fittingbox-message,
#fittingbox-fitmix.fittingbox-fitmix #fitlive-container,
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container,
#fittingbox-fitmix.fittingbox-fitmix #fitviewer-container,
#fittingbox-fitmix.fittingbox-fitmix #fitlive,
#fittingbox-fitmix.fittingbox-fitmix #fitphoto,
#fittingbox-fitmix.fittingbox-fitmix #fitviewer,
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container #webcam-container,
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container #webcam-container #flow,
#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share
{
    height: 100% !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fitlive-container, 
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container, 
#fittingbox-fitmix.fittingbox-fitmix #fitviewer-container,
#fittingbox-fitmix.fittingbox-fitmix #fitlive, 
#fittingbox-fitmix.fittingbox-fitmix #fitphoto, 
#fittingbox-fitmix.fittingbox-fitmix #fitviewer, 
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container #webcam-container
{
    width: 100% !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fitlive-container, 
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container, 
#fittingbox-fitmix.fittingbox-fitmix #fitviewer-container
{
    box-sizing:border-box !important;
    -moz-box-sizing:border-box !important;
    -webkit-box-sizing:border-box !important;
    border-left: 52px transparent solid !important;
    border-right: 52px transparent solid !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fitlive, 
#fittingbox-fitmix.fittingbox-fitmix #fitphoto, 
#fittingbox-fitmix.fittingbox-fitmix #fitviewer, 
#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container #webcam-container
{
    left: 0 !important;;
    border: 1px solid white !important;
    box-shadow: 0px 0px 10px #333333 !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share > a, 
#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share > div, 
#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share > span
{
    width: 30px !important;
    height: 30px !important;
    margin-bottom: 10px !important;
    padding: 0 !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share > span
{
    display: none !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share > #face,
#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share > #face > div
{
    width: 30px !important;
    height: 30px !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container .actions div.button
{
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fittingbox-message
{
    left: 10% !important;
    width: 80% !important;
}

#fittingbox-fitmix.fittingbox-fitmix .actions,
#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share
{
    width: auto !important;
}

#fittingbox-fitmix.fittingbox-fitmix .actions
{
    left: -42px !important;
    top: 0px !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fitlive-container .actions
{
    left: -42px !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fittingbox-share
{
    right: 10px !important;
    top: 0px !important;
}

#fittingbox-fitmix.fittingbox-fitmix #fitphoto-container #webcam-container #buttons
{
    padding-bottom: 10px !important;
    height: auto !important;
}