Skip to content

Simple and beautiful sliders in pure JavaScript!

Notifications You must be signed in to change notification settings

BlueManCZ/Sliders.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sliders.js

Simple and beautiful sliders in pure JavaScript!

Sliders.js allows you to add practical, value sliders as inputs to your HTML forms. Check live demo.

Screenshot

Features

1. Easy to setup

First download files: sliders.js and slider.css.

Then include these files into your HTML file:

JavaScript in <body>
<script type="text/javascript" src="sliders.js"></script>
CSS in <head>
<link rel=stylesheet href="slider.css">

2. Easy to use

You can easily create slider as HTML input.

<input type="text" class="slider1" name="value1" text="Value 1:">

Important! Each slider must have same class "slider1" and different name attribute!

3. Customizable

There are many attributes, which can modify slider's functionalities.

Here is list of them:

Attribute Value Description Default
text text Visible slider title -
min number Lower boundary of slider, must be lower than max 0
max number Upper boundary of slider, must be higher than min 100
value number Default value of slider min
round number Decimal places of value rounding 0
animate yes / no Enable or disable slider animation yes
smooth yes / no Smooth movement of small range slider no
color color Specify fill color #7EF4FF

Use attributes in input tag: (example)

<input type="text" class="slider1" name="value1" text="Value 1:" min="10" max="20" value="15" round="2">

You can of course use the default input attributes as id, autocomplete, title, etc.

About

Simple and beautiful sliders in pure JavaScript!

Topics

Resources

Stars

Watchers

Forks