Skip to content

A very basic page stacking system. Learning to create jQuery plugins.

Notifications You must be signed in to change notification settings

kelvinz/my-page-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myPageStack

A very basic page stacking system. Learning to create jQuery plugins.

Assumptions

Assumes usage of:

Usage

Add myPageStack.js

<script src="js/myPageStack.js"></script>

Have a div with the id of my-page-stack.

<div id="my-page-stack"></div>

Have section divs nested inside my-page-stack.

<div id="my-page-stack">
	<div class="section"></div>
	<div class="section"></div>
</div>

For dot navs, scrollable sections etc, follow index.html and app.scss for configurations.

Add the script that attaches myPageStack to the page.

<script type="text/javascript">
	$( '#my-page-stack' ).myPageStack({
		// change settings or else can remove them
		stacked  : 3,     // 1 is scroll, 2 is stack, 3 is reverse stack
		callback : false, // should there be a callback to section
		dotNav   : true,  // is there a dot menu
		topNav   : true,  // is there a top menu
		loopTop  : false  // loop sections
	});

	// section animations
	$( '#my-page-stack' ).on( 'section', function( e, which ) {
		// which is a number index from 0 to x
		// alert( which );
	});
</script>

Notes ( to self )

  • Add tooltip for dot menu buttons
  • Combine scolling functions to minimize scripts

Feel free to use this or point out any mistakes.

[@Kelvin___] (https://twitter.com/Kelvin___)

About

A very basic page stacking system. Learning to create jQuery plugins.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published