npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bootstrap-slider-legacy

v3.0.0

Published

Slider view component for Twitter Bootstrap.

Downloads

2

Readme

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.

| Name | Type | Default | Description | | ---- |:----:|:-------:|:----------- | | id | string | '' | set the id of the slider element when it's created | | min | float | 0 | minimum possible value | | max | float | 10 | maximum possible value | | step | float | 1 | increment step | | orientation | string | 'horizontal' | set the orientation. Accepts 'vertical' or 'horizontal' | | value | float,array | 5 | initial value. Use array to have a range slider. | | selection | string | 'before' | selection placement. Accepts: 'before', 'after' or 'none'. In case of a range slider, the selection will be placed between the handles | | tooltip | string | 'show' | whether to show the tooltip on drag, hide the tooltip, or always show the tooltip. Accepts: 'show', 'hide', or 'always' | | handle | string | 'round' | handle shape. Accepts: 'round', 'square' or 'triangle' | | reversed | bool | false | whether or not the slider should be reversed | | enabled | bool | true | whether or not the slider is initially enabled | | formater | function | returns the plain value | formatter callback. Return the value wanted to be displayed in the tooltip |

Functions

| Function | Description | | -------- | ----------- | | .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

| Event | Description | | ----- | ----------- | | slideStart | This event fires when dragging starts | | slide | This event fires when the slider is dragged | | slideStop | This event fires when the dragging stops | | slideChange | This event fires when the slider value changes via slider.setValue() | | slideEnabled | This event fires when the slider is enabled | | slideDisabled | This event fires when the slider is disabled |