Uncaught Error: cannot call methods on slider prior to initialization; attempted to call method 'value'jquery.min.js:2
I'm using the latest version of Google Chrome in both cases. All source files should be identical. The slider is initialized during page load (otherwise I couldn't click on it, right?), so I'm not sure what to make of the error.
That's great advice, but I stumbled upon a solution last night without it. I'll post it here in case it comes up in search results.
The error was poorly worded; initialization had nothing to do with the problem. Instead, it seems that we're not allowed to call the .slider("value") method on the same object within its own change() method. I didn't call .slide("value") directly, but instead within the function updatePathDisplay(). The error disappeared when I modified updatePathDisplay() to accept the slider value as an optional argument. Within the change() function, I called updatePathDisplay(ui.value).
Leave a comment on carpiediem's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic