multi-slider


MultiSlider jQuery Plugin

Introduction

In a given project, I was in need to implement a slider component that could divide a total value into two or more percentages. For that purpose, a standard slider component (i.e. jQuer UI Slider) won't do the trick, so I started developing a component from scratch that could receive n number of values.

Details

Using tables was a suitable approach, as they have the ability to take automatic widths over a fixed space, but then I quickly changed to floating divs since they could easily imitate cells behavior, and save lots of markup too.

In that context, I create handlers between divisions that could increase or decrease the adjacent divs.

This plugin makes use of closures, and methods are defined in an object at the beginning of the script (as jQuery Documentation recommends).

Project Information

The project was created on Jun 10, 2011.

Labels:
JavaScript jQuery UI slider multi plugin