Socket
Socket
Sign inDemoInstall

bootstrap-slider-legacy

Package Overview
Dependencies
312
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bootstrap-slider-legacy

Slider view component for Twitter Bootstrap.


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

bootstrap-slider Build Status

A "fork" of bootstrap-slider found on http://www.eyecon.ro/ originally by Stefan Petre.

Want to use this with Rails? Check it out!

Installation

Clone the repository, then run npm install

Want to use bower? bower install seiyria-bootstrap-slider

Examples

You can see all of our API examples here.

Using bootstrap-slider

Create an input element and call .slider() on it:

$("input.slider").slider();

Options

Options can be passed either as a data (data-slider-foo) attribute, or as part of an object in the slider call. The only exception here is the formater argument - that can not be passed as a data- attribute.

NameTypeDefaultDescription
idstring''set the id of the slider element when it's created
minfloat0minimum possible value
maxfloat10maximum possible value
stepfloat1increment step
orientationstring'horizontal'set the orientation. Accepts 'vertical' or 'horizontal'
valuefloat,array5initial value. Use array to have a range slider.
selectionstring'before'selection placement. Accepts: 'before', 'after' or 'none'. In case of a range slider, the selection will be placed between the handles
tooltipstring'show'whether to show the tooltip on drag, hide the tooltip, or always show the tooltip. Accepts: 'show', 'hide', or 'always'
handlestring'round'handle shape. Accepts: 'round', 'square' or 'triangle'
reversedboolfalsewhether or not the slider should be reversed
enabledbooltruewhether or not the slider is initially enabled
formaterfunctionreturns the plain valueformatter callback. Return the value wanted to be displayed in the tooltip

Functions

FunctionDescription
.slider(options)Initializes the slider
.slider('getValue')Get the current value from the slider
.slider('setValue', newValue)Set a new value for the slider
.slider('destroy')Properly clean up and remove the slider instance
.slider('disable')Disables the slider and prevents the user from changing the value
.slider('enable')Enables the slider
.slider('toggle')Toggles the slider between enabled and disabled
.slider('isEnabled')Returns true if enabled, false if disabled

Events

EventDescription
slideStartThis event fires when dragging starts
slideThis event fires when the slider is dragged
slideStopThis event fires when the dragging stops
slideChangeThis event fires when the slider value changes via slider.setValue()
slideEnabledThis event fires when the slider is enabled
slideDisabledThis event fires when the slider is disabled

FAQs

Last updated on 09 Jul 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc