FitPhoto Developer Documentation

Call to action example

Example

Javascript Code

window.onload = function()
{
    FitPhoto = Fb.FitPhoto.GetInstance(
        {
            FitPhoto:
            {
                container: '#myFitPhoto',
                cookieduration: 0,
                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');
            FitPhoto.SetFrame($(this).attr('rel'));
        }
    );
}

CSS Code

#fittingbox-fitphoto #fittingbox-fitphoto-calltoaction
{
    display: block;
}