I wish to incorporate a function like observed in Mashable. It is the next publish widget. Should you achieve the finish from the publish, an indicator can look around the right side. I discovered an answer with this http://clokey2k.com/blog/2011/09/08-mashables-cool-next-post-widget/, but it is no longer working for me personally.

This is how used to do:

1, added a nextpost.js file towards the cause of the webserver

$(function(){
//When should it be triggered in this case - when the '.next-link' is visible, but it could be the '.offset().bottom' of the article?
limit = $('.next-link').offset().top;
//Account for the height of the window - would have to readjust on resize;
target = limit - $(window).height();
//Hide the fancy fixed position box;
$nextbox = $('.next-box')
$nextbox.css({right: '-=150px'});
//Make a note of it's status;
visible = false

//Cue Magic - every time the window scrolls;
$(window).scroll(function(){
    //Where are we?
    current =  $(window).scrollTop();
    //Hit the target - show me the box;
    if(current >= target && visible == false){
        $nextbox.animate({right: '+=150px'}, 500);
        visible = true;
    }
    //Gone back up to re-read the article - hide it again!
    if(current < target && visible == true){
        $nextbox.animate({right: '-=150px'}, 500);
        visible = false;
    };
});

)

2, placed the next code within the mind:

<script type="text/javascript" src=".../nextpost.js"></script>

3, addded codes:

<div class="next-link">fb-share button</div>
<div class="next-box">code of a wp widget area</div>

The issue is, the widget area (next-box) is definitely seems, not just after i achieve the following-link section. I believe the proble is by using the javascript integration. What must i do?