Skip to content

Newah1/splitpoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPLITPOINT.JS

DEMO

splitpoint is a small script designed to allow you to split an element on any given Y coordinate in your document (as defined by a DOM element).

Example:

new Splitpoint(
    document.querySelector(".white-box"), // the element you will be splitting
    {
        absolute: false, // Whether the new element will be absolute or not
        split_element: document.querySelector(".gray-bg"), // element we use as the split point
        side: "top" // what side of that element to split on
    }
);

splitpoint.js adds a duplicate element as a child to the element you passed in, and gives it an additional class of ".splitpoint", making it easy to customize your duplicate element as you wish.

About

Split between two elements on a scroll point.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published