A repository of jquery plugins for delivering various mobile navigation patterns to smartphones
- Copyright 2012: Colin Clark, bitdepth.co.uk
- Dual licensed under the MIT or GPL Version 2 licenses.
This script is written as a fast and lightweight mobile menu pattern as seen on Facebook mobile site. No styling provided, it's completely up to you how you want to look.
======
-
In your page create two container elements one for your navigation and another for your content.
-
Create a toggle menu button, this can be place outside of the content container but it makes more sense to place it inside it.
-
Call the plugin on your menu toggle button using the following syntax. You provide a string selector for the navigation container and the main content as well as the width you wish the navigation to occupy.
$('#toggle-menu-btn').slideMenu({
nav: '[role=navigation]',
content: '[role=main]',
navWidth: '200px'
});