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',
            hideintegration: true
        }
    );
    
    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'));
            }
        }
    }
}