Giter Site home page Giter Site logo

box-lid's Introduction

Box Lid Menu

This jQuery plugin creates the box lid effect for navigation menus, and is inspired by Toybox. Prettier documentation, with a built-in demo, is available here.

Installation

First, include the main stylesheet and javascript as follows:

<link rel='stylesheet' type='text/css' href='css/box-lid.css'>
<script src='js/jquery.box-lid.min.js'></script>

Next, create the following HTML structure:

  <div class='box-lid-menu'>
    <div class='box-lid-icon'></div>
    <nav>
      <!-- NAVIGATION CONTENTS -->
    </nav>
  </div>
  <div class='box-lid'>
    <div class='box-lid-content'>
      <!-- MAIN CONTENT -->
    </div>
  </div>

Finally, invoke $('.box-lid-menu').boxLid() where appropriate. The most common usage should be

$(function() {
  $('.box-lid-menu').boxLid();
});

You are highly encouraged to style your own navigation menu within the nav element. The demo and the docs currently use sass/box-lid-nav.scss.

Configuration

There are two ways to configure the menu.

SCSS

If you use SCSS, simply override the configuration variables before importing sass/box-lid.scss. For example,

$box-lid-background: #ccc;
@import 'box-lid';

Refer to the beginning of sass/box-lid.scss for the complete list of configuration variables.

CSS

If the above method is not your cup of tea, you can also choose to override the CSS. Unfortunately this method is terribly brittle.

box-lid's People

Watchers

saravanan 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.