Giter Site home page Giter Site logo

range-slider's Introduction

Single/range slider plugin - pure JS

No dependencies required

alt text

Demo and usage: DEMO

range-slider's People

Contributors

slawomir-zaziablo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

range-slider's Issues

Freeze when adding step

Hi, when I use this piece of code, the page cannot be opened, it keeps loading and freezes my browser when I add the step parameter.

Range values

HI, was using your rSlider, but I couldn't get the range values, so i added getValues functions. Wanted to know if there are other ways to get the range values instead of just the value or if you will want to add the
getValues function into your code base

Request Feture

Please add range changing option on keyboard arrow key press

Browser responsive

How to make this slider browser responsive? The number breaks the line while using the various browsers.

Delay in event fire

After the slider moves to the value, there is a 1-2 sec delay in the event (onChange) firing.

(function () {
      'use strict';
      var init = function () {
        var slider2 = new rSlider({
          target: '#price-slider',
          values: ['$9', '$19', '$29', '$39'],
          range: false,
          set: [4],
          tooltip: false,
          onChange: function (vals) {
            console.log(vals)
          }
        });
      };
      window.onload = init;
    })();

onChange does not return any value

Hey, i tried to use this slider but the onChange function seems to not fire?

Bildschirmfoto 2020-12-20 um 11 38 18

The slider itself does display the right way:

Bildschirmfoto 2020-12-20 um 11 39 30

Any idea?

Greetings,
Chris

.min files differ from src

The rSlider.min.js file (only start shown here)
function() { "use strict"; var t = function(t) { this.input = null, this.inputDisplay = null, this.slider = null, this.sliderWidth = 0, this.sliderLeft = 0, this.pointerWidth = 0, this.pointerR = null, this.pointerL = null, this.activePointer = null, this.selected = null, this.scale = null, this.step = 0, this.tipL = null, this.tipR = null, this.timeout = null, this.valRange = !1, this.values = { start: null, end: null }, this.conf = { target: null, values: null, set: null, range: !1, width: null, scale: !0, labels: !0, tooltip: !0, step: null, disabled: !1, onChange: null },
differs from the rSlider,js one

`(function () {
'use strict';

var RS = function (conf) {
	this.input 			= null;
	this.inputDisplay 	= null;
	this.slider 		= null;
	this.sliderWidth	= 0;
	this.sliderLeft		= 0;
	this.pointerWidth	= 0;
	this.pointerR		= null;
	this.pointerL		= null;
	this.activePointer	= null;
	this.selected 		= null;
	this.scale 			= null;
	this.step 			= 0;
	this.tipL			= null;
	this.tipR			= null;
	this.timeout		= null;
	this.valRange		= false;

	this.values = {
		start:	null,
		end:	null
	};
	this.conf = {
		target: 	null,
		values: 	null,
		set: 		null,
		range: 		false,
		width: 		null,
		scale:		true,
		labels:		true,
		tooltip:	true,
		step: 		null,
		disabled:	false,
		onChange:	null
	};

`
Maybe the .min files haven't been stripped and updated lately?

onChange not fires

In my code I have this line:

range_slider.onChange(function (values) { alert() });

When I use the Slider (move with first or second pointer) this callback doesnt fire...

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.