Organizational Research By

Surprising Reserch Topic

Question:Animated bars at scroll position



asked Sep 13, 2013 in jquery by anonymous
edited Sep 12, 2013
0 votes
23 views



Related Hot Questions

2 Answers

0 votes
I created some animated bars with jquery. I'm only really just learning jQuery & javascript. It was working last night, the bars animated when at a certain scroll position but now it doesn't work, nothing has been changed. Anyone help me out? Or is there a better way to do it than what I'm doing?

$(document).ready(function(){
    $(document).scroll(function() {
        var top = $(document).scrollTop();
        console.log(top);
        if (top > 930) $("#html, #css").animate({width:"100%"}, 2000);
        if (top > 930) $("#javascript").animate({width:"70%"}, 2000);
        if (top > 930) $("#php").animate({width:"50%"}, 2000);
        if (top > 930) $("#mysql").animate({width:"30%"}, 2000);
        if (top > 930) $("#wordpress").animate({width:"60%"}, 2000);
    });
});
answered Sep 13, 2013 by anonymous
edited Sep 12, 2013
0 votes
I created some animated bars with jquery. I'm only really just learning jQuery & javascript. It was working last night, the bars animated when at a certain scroll position but now it doesn't work, nothing has been changed. Anyone help me out? Or is there a better way to do it than what I'm doing?

$(document).ready(function(){
    $(document).scroll(function() {
        var top = $(document).scrollTop();
        console.log(top);
        if (top > 930) $("#html, #css").animate({width:"100%"}, 2000);
        if (top > 930) $("#javascript").animate({width:"70%"}, 2000);
        if (top > 930) $("#php").animate({width:"50%"}, 2000);
        if (top > 930) $("#mysql").animate({width:"30%"}, 2000);
        if (top > 930) $("#wordpress").animate({width:"60%"}, 2000);
    });
});
answered Sep 13, 2013 by anonymous
edited Sep 12, 2013

...