Giter Site home page Giter Site logo

redboss1 / jquery-drilldown Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cinamonas/jquery-drilldown

0.0 1.0 0.0 34 KB

A simple jQuery plugin for creating animated drilldown menus

Home Page: http://cinamonas.github.io/jquery-drilldown/

License: MIT License

HTML 36.21% JavaScript 63.79%

jquery-drilldown's Introduction

jQuery Drilldown

A simple jQuery plugin for creating animated drilldown menus.

Since v1.0.0, project follows Semantic Versioning.

Features

  • UMD (AMD, Node/CommonJS) support
  • Multiple menus on a single page
  • Pretty flexible, doesn't enforce specific tags
  • Lightweight: 2 KB when minified (even less after gzip)

Demo

View it here.

Usage

var options = {};

$('.drilldown').drilldown(options);

Options

Shown with their default values:

{
  event: 'click', // * View note below
  selector: 'a',  // * View note below
  speed: 100,
  cssClass: {
    container: 'drilldown-container',
    root: 'drilldown-root',
    sub: 'drilldown-sub',
    back: 'drilldown-back'
  }
}

* Note: selector and event will be used for binding drilldown-initiating action in this manner:

$('.drilldown').on(event, selector, function () { /* ... */ });

API

  • $('.drilldown').drilldown('reset') resets drilldown to its initial state
  • $('.drilldown').drilldown('destroy') destroys plugin instance

CSS & HTML

.drilldown {
  overflow: hidden;
}
.drilldown-sub {
  display: none;
}
<div class="drilldown"> <!-- required -->
  <div class="drilldown-container"> <!-- required -->
  
    <ul class="drilldown-root"> <!-- required, but not necessarily UL -->
      <li><a>A Lorem ipsum</a></li>
      <li>
        <a>A Dolor sit amet</a>
        <ul class="drilldown-sub"> <!-- required for deeper (non-root) levels -->
          <li class="drilldown-back"><a>Back</a></li> <!-- required to be able to go back -->
          <li><a>A Fusce eget</a></li>
          <li>
            <a>A Quam vel lorem</a>
            <ul class="drilldown-sub">
              <li class="drilldown-back"><a>Back</a></li>
              <li><a>A Molestie tincidunt</a></li>
              <li><a>A Pellentesque</a></li>
            </ul>
          </li>
          <li><a>A Sit amet tincidunt</a></li>
        </ul>
      </li>
      <li><a>A Consectetur</a></li>
      <li><a>A Maecenas id</a></li>
      <li>
        <a>A Hendrerit odio</a>
        <ul class="drilldown-sub">
          <li class="drilldown-back"><a>Back</a></li>
          <li><a>A Cras tincidunt</a></li>
          <li><a>A Vivamus eu</a></li>
        </ul>
      </li>
    </ul>
    
  </div>
</div>

License

MIT

jquery-drilldown's People

Contributors

cinamonas avatar

Watchers

 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.