This topic contains 1 reply, has 2 voices, and was last updated by  Ehsan Dalvand 3 years, 6 months ago.

Vertical Bar

  • Hello ,

    Could anyone please help me with something .

    I am trying to understand how the Vertical Bar works . Could anybody tell me is it a javascript based on JQuery or anything else , could anybody please write 2-3 rows of info about it ? And could you point the direction to the file in the js folder of the website .

    Thank you in advance .

    Hello there,

    Sorry for late reply. It’s just few JavaScript line which you can find in “JS/custom.js” file. Search for “//Vertical bar charts”:

     //Vertical bar charts
            var windowHeight=$(window).height(),
                elem=demandPage.find('.chart-container'),
                elemOffset=windowHeight-elem.height()+100;
            elem.waypoint(function() {
                elem.find('li').each(function(){
                    var percent=$(this).attr('data-percent');
                    TweenMax.to($(this).children('.bar'),2,{height:percent});
                });
            },{
                context: demandPage.find('.inner-wrapper'),
                offset:elemOffset,
                triggerOnce: true
            });    
    

    Basically it increase the height of each bar based on provided data-percent attribute.

    Let me know if you need any further details.

The topic ‘Vertical Bar’ is closed to new replies.