Code Monkey home page Code Monkey logo

off-canvas-infinity-push's Introduction

off-canvas-infinity-push

Off Canvas Infinity Push is a jQuery plugin that gives you the ability to make any desktop navigation into a mobile navigation. This plugin offers unlimited sub navigations.

Demos

Live Examples

Getting Started

Load jQuery(1.7+) and include Off Canvas Infinity Push plugin files. Add the stylesheet (jquery.ma.infinitypush.css) and the plugin (jquery.ma.infinitypush.js or jquery.ma.infinitypush.min.js) in your website. The stylesheet can be modified to fit the website design.

<!-- Basic stylesheet -->
<link rel="stylesheet" type="text/css" href="plugin/jquery.ma.infinitypush.css" />

<!-- Include js plugin -->
<script src="plugin/jquery.ma.infinitypush.js"></script>

Basic Navigation Markup

<nav id="primary-navigation">
	<ul>
		<li><a href="#">Link</a>

			<ul>
				<li><a href="#">Link</a>

					<ul>
						<li><a href="#">Link</a>

							<ul>
								<li><a href="#">Link</a></li>
								<li><a href="#">Link</a></li>
								<li><a href="#">Link</a></li>
								<li><a href="#">Link</a></li>
							</ul>

						</li>
						<li><a href="#">Link</a></li>
						<li><a href="#">Link</a></li>
						<li><a href="#">Link</a></li>
					</ul>

				</li>
				<li><a href="#">Link</a>

					<ul>
						<li><a href="#">Link</a></li>
						<li><a href="#">Link</a></li>
						<li><a href="#">Link</a></li>
						<li><a href="#">Link</a></li>
					</ul>

				</li>
				<li><a href="#">Link</a></li>
				<li><a href="#">Link</a></li>
			</ul>

		</li>
		<li><a href="#">Link</a></li>
		<li><a href="#">Link</a></li>
		<li><a href="#">Link</a></li>
		<li><a href="#">Link</a></li>
	</ul>
</nav>

Call the plugin

Now call the Off Canvas Push Infinity initializer function and your mobile navigation is ready.

<script type="text/javascript">

	$(document).ready(function(){

		$('#primary-navigation').infinitypush({
			openingspeed: 300,
			closingspeed: 300
		});

	});

</script>

Options

  • offcanvas: true, // Set to "false" to turn off the off canvas
  • offcanvasspeed: 400, // Opening animation for the off canvas in milliseconds
  • offcanvasleft: true, // Set to "false" for the right hand side position
  • openingspeed: 400, // Opening push animation in milliseconds
  • closingspeed: 400, // Closing animation in milliseconds
  • pushdirectionleft: true, // Set the push direction from right to left. "false" for left to right
  • spacing: 90, // The spacing is in pixel
  • autoScroll: true, // Set to "false" if you don't need the auto scroll up
  • scrollSpeed: 300, // Scroll up animation in milliseconds
  • destroy: false // Set to "true" to reset the navigation

License

The MIT License (MIT)

off-canvas-infinity-push's People

Contributors

scottaohara avatar

Watchers

James Cloos avatar hunter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.