andreruffert / rangeslider.js

🎚 HTML5 input range slider element jQuery polyfill
https://rangeslider.js.org
MIT License
2.17k stars 401 forks source link

some suggestion #129

Open stephanfriedrich opened 9 years ago

stephanfriedrich commented 9 years ago

Hi, i like your lightweight polyfill. I think these points could be helpful:

Hope you understand what i mean, because of my awful English. ;)

andreruffert commented 9 years ago

Thanks! Glad u like it :relaxed:

q: callback afterInit ( e.g. if you want to wrap div.rageslider with another div ) a: You can use the onInit callback for this e.g.

$('input[type=range]').rangeslider({
  onInit: function() {
    this.$range.wrap('<div class="newElement" />');
  }
});

q: browser like default style ( in my case, i have to overwrite your default style to do this ) a: I already thought about this. I guess I'll split the CSS into default and appearance. To avoid the overwrite of styles for now simply don't include the rangeslider.css and directly adjust it to your needs and use this :wink:

q: option for auto-hide ( e.g. i dont need to write css :-) ) a: I don't see this as a feature for rangeslider.js. You could simply add a class etc.

q: option to use rangeslider for IE10/11 ( e.g. if you dont want to write IE10/11 input-range styling ) a: You already can do this by setting polyfill: false which will disable the feature detection and initialize rangeslider.js also in Browsers who have native support for the <input type="range"> element.

$('input[type=range]').rangeslider({
  polyfill: false
});