glide

A slick JS scroll-to component.

Showing:

Popularity

Downloads/wk

21

GitHub Stars

1

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

1

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Glide

A slick JS scroll-to component.

Glide is a really simple scroll-to component written in vanilla JS. You can use it in vanilla JS or integrate it with jQuery.

Requirments

Installation

npm install glide

Usage

Require it:

var Glide = require('glide');

Then call it:

new Glide(element, offset);

The offset is added to the top of the element and should just be numeric (e.g. 100).

Here is an example in jQuery that will take the href of each main nav link and go to that id in the DOM.

$(function(){
    $('.main-nav a').on('click', function(e){
        e.preventDefault();
        var t = this.hash.replace('#', '');
        new Glide(t, 130);
    });
});

Sites using Glide

6 Summits Challenge

Credits

Glide is maintained by Piccirilli Dorsey

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial