rangeslider.js
rangeslider.js copied to clipboard
this.handleDimension rangeslider - Uncaught TypeError: Cannot read property '0' of undefined
Getting this error using the latest version of range slider and the basic example
@sebastienb a quick example would be nice to figure out whats goin on...
Yea same here. Not sure how to give an example other than the boilerplate. Here's a stack overflow of the same: http://stackoverflow.com/questions/37825296/rangeslider-js-uncaught-typeerror-cannot-read-property-0-of-undefined
Thanks for putting this out, looks awesome!!
Having a similar problem is that if I initialized rangesilder with polyfill=true, and calling this sequence:
$('input[type="range"]').attr({min: 100, max: 1000});
$('input[type="range"]').val(100).change();
$('input[type="range"]').rangeslider('update', true);
This throws error for me that $handle isn't being set.
chrome version 57.0.2987.133
Same problem here (Cannot read property '0' of undefined), with the latest versions of jQuery and rangeslider, using the boilerplate example from the top of the rangefinder page. No fix in half a year since this thread was opened, and a year since it was mentioned on StackOverflow? :( Is the project dead?
Trying to dig into why the sliders on your website work but your boilerplate doesn't.... the code that underpins the website is nothing at all like the boilerplate (under the "Usage" section) :Þ There's some ' output id="js-output" ' that breaks the slider if it goes missing, a giant section of code at the bottom, etc, etc. It doesn't even resemble the boilerplate. The code examples are equally useless, as they give even less information than the boilerplate.
If you're still around, could you give a minimal full working example that includes everything needed to invoke a slider (Google Chrome 59.0.3071.115), and nothing more?
remove the update call at the end of the example and the destroy call aswell. it should work perfect afterwards. just managed making it work.
The solution here works for me.
Caught the same issue on Android/Chrome. Devices: Galaxy S7 (real device), Galaxy Note 4 (Browserstack).
It seems like I tried to call $('input[type="range"]').rangeslider('update');
before initializing the rangeslider and it caused this error.
@kkomelin Yes, so I have opened a pull request #304 to clarify the usage.
@j3soon Thanks.