rangeslider.js icon indicating copy to clipboard operation
rangeslider.js copied to clipboard

some suggestion

Open stephanfriedrich opened this issue 9 years ago • 1 comments

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

  • callback afterInit ( e.g. if you want to wrap div.rageslider with another div )
  • browser like default style ( in my case, i have to overwrite your default style to do this )
  • option for auto-hide ( e.g. i dont need to write css :-) )
  • option to use rangeslider for IE10/11 ( e.g. if you dont want to write IE10/11 input-range styling )

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

stephanfriedrich avatar Mar 04 '15 11:03 stephanfriedrich

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
});

andreruffert avatar Mar 04 '15 12:03 andreruffert