FitLive Developer Documentation

Call to action example

Example

Javascript Code

window.onload = function()
{
    FitLive = Fb.FitLive.GetInstance(
        {
            FitLive:
            {
                container: '#myFitLive',
                css: '/examples/calltoaction.css',
                onCallToActionClick: function(pSkunumber)
                {
                    alert('Call to action element is clicked with skunumber "' + pSkunumber + '"');
                }
            }
            
        }
    );
    $('#frames img').click(
        function()
        {
            $('#frames img').removeClass('selected');
            $(this).addClass('selected');
            FitLive.SetFrame($(this).attr('rel'));
        }
    );
    $('#frames img:first').click();
}

CSS Code

#fittingbox-fitlive #fittingbox-fitlive-menu #fittingbox-fitlive-calltoaction
{
    display: block;
}