Skip to content

Stefuu/fix-until

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fix-until

A simple javascript lib that fixes elements on scroll, until they reach the respective desired element

Usage

With simple element-target pairs, the element .myDiv will stop at the element .myDivTarget and so on

var pairsA = new Fixuntil({ 
		"elements" : ['.myDiv','.myHeader'], 
		"targets" : ['.myDivTarget','.myHeaderTarget'] 
	});

With multiple possible targets to an element, the element .el1 will stop at the element .el3, if it exists, and will stop at the element .el4 if .el3 does not exists, .el2 will stop at .el7

	var pairsB = new Fixuntil({ 
			"elements" : [
							'.el1',
							'.el2'
						], 
			"targets" : [
							['.el3','.el4'],
							'.el7'
						]
		});

About

A simple javascript lib that fixes elements on scroll, until they reach the respective desired element

Resources

License

Stars

1 star

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors