DailyJS

jQuery Roundup: 1.5.2, Waypoints, Sausage

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

jquery plugins

jQuery Roundup: 1.5.2, Waypoints, Sausage

Posted by Alex R. Young on .
Featured

jquery plugins

jQuery Roundup: 1.5.2, Waypoints, Sausage

Posted by Alex R. Young on .

jQuery 1.5.2 Released

jQuery 1.5.2 was released on
March 31st, just as planned. Who says IT projects are late and
over-budget?! This release includes 18 bug fixes.

jQuery Waypoints

jQuery Waypoints (GitHub: imakewebthings / jquery-waypoints,
MIT/GPL) by Caleb Troughton triggers a function when scrolling reaches
an element. This could be used to create infinite
scrolling
,
sticky elements,
and even scrolling
analytics
).

Waypoints works by applying a callback to an element:

$('.entry').waypoint(function() {
  alert('You have scrolled to an entry.');
});

Sausage

Sausage (GitHub: christophercliff / sausage) by Christopher
Cliff is a jQuery UI widget for presenting context alongside infinite
scrolling pages. There's a nice example of Sausage showing CouchDB
documentation
,
with section annotations along the right-hand-side.

That example uses this JavaScript:

$(window)
    .sausage({
        content: function (i, $page) {
            return ''
                + $page.find('.anchor').first().text()
                + '';
        }
    });

Each section of text in the CouchDB documentation is wrapped with an
element with a class of page, so the \$page
part would really look like this:
\$('.page').find('.anchor').first().text(). That lets
Sausage find the title of each section to use for its navigation.