js/jellyfish.js
function buildOptions(i) {
        var index = (i + 1);
        var isCurrent = i === current;

        // Options for each text, arrow and image, using the base options and the index
        var text = extend({}, optionsText, {paths: '#jelly-text-' + index + ' path'});
        var arrow = extend({}, optionsArrow, {paths: '#jelly-arrow-' + index});
        var image = extend({}, isCurrent ? optionsImage : optionsCircle, {image: 'img/image-' + index + '.jpg'});

        // If not the current item, set circle in the position defined, hide text, and hide arrow
        if (!isCurrent) {
            extend(image, circlePositions[i]);
            extend(text, {hidden: true});
            extend(arrow, {hidden: true});
        }

        // Push all of these to the options array
        options.push(text);
        options.push(arrow);
        options.push(image);
    }
function buildOptions(i) {
        var index = (i + 1);
        var isCurrent = i === current;

        // Options for each text, arrow and image, using the base options and the index
        var text = extend({}, optionsText, {paths: '#jelly-text-' + index + ' path'});
        var arrow = extend({}, optionsArrow, {paths: '#jelly-arrow-' + index});
        var image = extend({}, isCurrent ? optionsImage : optionsCircle, {image: 'img/image-' + index + '.jpg'});

        // If not the current item, set circle in the position defined, hide text, and hide arrow
        if (!isCurrent) {
            extend(image, circlePositions[i]);
            extend(text, {hidden: true});
            extend(arrow, {hidden: true});
        }

        // Push all of these to the options array
        options.push(text);
        options.push(arrow);
        options.push(image);
    }
function buildOptions ( i ) { var index = ( i + 1 ) ; var isCurrent = i === current ; // Options for each text, arrow and image, using the base options and the index var text = extend ( { } , optionsText , { paths : '#jelly-text-' + index + ' path' } ) ; var arrow = extend ( { } , optionsArrow , { paths : '#jelly-arrow-' + index } ) ; var image = extend ( { } , isCurrent ? optionsImage : optionsCircle , { image : 'img/image-' + index + '.jpg' } ) ; // If not the current item, set circle in the position defined, hide text, and hide arrow if ( ! isCurrent ) { extend ( image , circlePositions [ i ] ) ; extend ( text , { hidden : true } ) ; extend ( arrow , { hidden : true } ) ; } // Push all of these to the options array options . push ( text ) ; options . push ( arrow ) ; options . push ( image ) ; }
Function to build the options for an specific item
Function to build the options for an specific item