shpshft / slinky

A light-weight, responsive, mobile-like menu plugin

Home Page:http://alizahid.github.io/slinky

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slinky

jQuery sliding menu

A light-weight, responsive, mobile-like navigation menu plugin

Installation

Download the latest version. The files you need are;

Bower

bower install jquery-slinky

Include these files;

<script src="bower_components/slinky/dist/jquery.slinky.js"></script>

<link rel="stylesheet" src="bower_components/slinky/dist/jquery.slinky.css">

NPM

npm install jquery-slinky

Include these files;

<script src="node_modules/slinky/dist/jquery.slinky.js"></script>

<link rel="stylesheet" src="node_modules/slinky/dist/jquery.slinky.css">

Usage

var slinky = $('.menu').slinky(options);

Options

Option Default value Description
label 'Back' Label for the back button. Pass true to use the link's own label
title false Pass true to show title of current menu level
speed 300 Animation speed in milliseconds
resize true Resize menu height to match content on navigation

API

.home()

Navigate back to the main menu

Option Default value Description
animate true Pass false to skip animation

.jump()

Navigate to a sub menu

Option Default value Description
to Pass a selector for the ul element to jump to
animate true Pass false to skip animation

.destroy()

Remove slinky

Tips

  • Set .active on a ul element to jump there on init

About

A light-weight, responsive, mobile-like menu plugin

http://alizahid.github.io/slinky

License:MIT License


Languages

Language:HTML 48.1%Language:JavaScript 29.3%Language:CSS 22.6%