Giter Club home page Giter Club logo

patch-panel's Introduction

Code ClimateBuild Status

Patch Panel

Patch Panel makes responsive grid + panel layouts possible by displaying the corresponding panel for an item beneath the row it was clicked, regardless of items per row, width of items, or number of rows.

Demo

http://patchpanel.alecortega.com

alt tag

Package Managers

// Bower
bower install patch-panel

// NPM
npm install patch-panel

Settings

Option Type Deault Description
buttonSelector string '.patch-button' Changes the selector that triggers the panel animation.
itemSelector string '.patch-item' Changes the selector for all child items that make up the grid (items that are shown).
panelSelector string '.patch-panel' Changes the selector for all panel items (panels are automatically hidden).
toggleSpeed int 300 Changes the speed at which panels are animated.

Initialization Example

$(element).patchpanel({
  toggleSpeed: 600
});

Gotchas

  • All elements are automatically hidden upon initialization with jQuery. Since there's a delay between the DOM loading and javascript initializing, the panels may flicker from visible to hidden. You can avoid this by placing the following in your stylesheet:
.patch-panel {
  display: none;
}

Future Updates

  • Better handling of events so that only two panels are triggered at any one time.
  • Callback events for panel triggered, and panel finished collapsing.
  • Handling of items of multiple heights.
  • Add super simple stylesheet that adds proper styling.

Dependencies

jQuery 2.1

License

Copyright (c) 2015 Alec Ortega

Licensed under the MIT license.

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.