Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

HTML5 input range slider element polyfill on a diet.

License

Notifications You must be signed in to change notification settings

mixer/rangeslider.js-mini

 
 

Repository files navigation

rangeslider.js

This is a fork of rangeslider.js, dropping its dependency on jQuery and nearly halving the filesize of the plugin itself.

Minified and gzipped sizes:

Before: 2468 bytes (rangeslider) + 37298 bytes (jquery) = 39766 bytes
After:  1641 bytes (rangeslider)                        = 1641 bytes

Saved 38125 bytes (96%).

Usage is similar, but slightly different. Same options and everything, but rather than calling $(el).rangeslider, it looks like this:

var slider = rangeslider(element, {
    polyfill: false
    // ...
});

slider.update(true); // instead of $(el).rangeslider('update', true);

slider.destroy(); // instead of $(el).rangeslider('destroy');

About

HTML5 input range slider element polyfill on a diet.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 64.3%
  • HTML 21.1%
  • CSS 14.6%