jQuery Roundup: 1.5.2, Waypoints, Sausage

2011-04-05 00:00:00 +0100 by Alex R. Young

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
sticky elements,
and even scrolling

Waypoints works by applying a callback to an element:

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


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
with section annotations along the right-hand-side.

That example uses this JavaScript:

        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.