Skip to content

juandopazo/yui3-scrollspy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YUI ScrollSpy Plugin

Travis Build Status

A Bootstrap-inspired ScrollSpy plugin for YUI

Getting Started

Create a new YUI instance for your application and populate it with the modules you need by specifying them as arguments to the YUI().use() method. YUI will automatically load any dependencies required by the modules you specify. Then plug the ScrollSpy plugin to the body of the page or any scrollable node and set the target attribute to any list that contains links to elements in the page.

<script>
YUI({
    gallery: 'gallery-2013.05.15-21-12'
}).use('gallery-scrollspy', function (Y) {
    
    Y.one('body').plug(Y.Plugin.ScrollSpy, {
        target: '#navbar'
    });

});
</script>

Alternatively you can set the target node as a data- attribute of the plugged node.

<body data-target="#navbar">...</body>

About

A Bootstrap-inspired ScrollSpy plugin for YUI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published