ScrollObserver 1.0

Simple class for scroll observing. You can add a X and / or a Y coordinate and every time the user scrolls befor or behind this coordinate your function will be executed.



Details

Author
Steffen Persch
Current version
1.0
GitHub
n3o77/ScrollObserver
Downloads
2763
Category
Utilities
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_: MooTools 1.2.x

How to use

Example 1: ScrollObserver.getInstance().add({ 'y': 40, 'x': 40,

    'beforeY': function() {
        alert("BeforeY");
    },

    'afterY': function() {
        alert("AfterY");
    },

    'beforeX': function() {
        alert("BeforeX");
    },

    'afterX': function() {
        alert("AfterX");
    }
});

Example 2: ScrollObserver.getInstance().add({ 'y': 40,

    'afterY': function() {
        alert("AfterY");
    }

});

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus