markgoodyear/scrollup — pull request #14 by freality (2013-12-04 17:07:53+00:00)
Title: add scrollTrigger option. Allow user to provide her own triggering eleme...

This feature allows users to pass a custom triggering element to scrollUp.

It's a feature I needed for a project I'm working on.

Example Usage: (use a FontAwesome glyph as link icon)
```
$(function () {
var scrollName = 'scrollUp'
, scrollText = 'Scroll to top'
, $icon = $('')
, $template = $('', {
id: scrollName,
href: '#top',
title: scrollText,
}).append($icon)
;

$.scrollUp({
scrollName: scrollName, // Element ID
topDistance: '300', // Distance from top before showing element (px)
topSpeed: 300, // Speed back to top (ms)
animation: 'slide', // Fade, slide, none
animationInSpeed: 200, // Animation in speed (ms)
animationOutSpeed: 200, // Animation out speed (ms)
scrollTrigger: $template, // Custom triggering element
scrollImg: true,
scrollText: scrollText, // Text for element
activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
});
});
```