Waypoint jQuery - 2 different offset for up and down roll
<p>Why it does not work correctly?
I need to create two different offsets. Small for up and bigest for down scrolling.
This code do not work well.</p>

<pre><code>// The same for all waypoints

$('body').delegate('section &gt; article', 'waypoint.reached', function(event, direction) {
    var $active = $(this);

    if (direction === "up") {
        $active = $active.prev();
        $('section &gt; article').waypoint({ offset: '10%' });
    }
    if (!$active.length) $active = $active.end();

            if (direction === "down") {

        $('section &gt; article').waypoint({ offset: '60%' });
    }


    $('.link-active').removeClass('link-active');
    $('a[href=#'+$active.attr('id')+']').addClass('link-active');
});

// Register each section as a waypoint.


$('section &gt; article#p1').waypoint({ offset: '28%' });
$('section &gt; article').waypoint({ offset: '0' });   
</code></pre>
