loopj / jquery-simple-slider

Unobtrusive numerical slider plugin for jQuery
194 stars 113 forks source link

jQuery node not really ready when "ready" is fired #39

Open ehouais opened 11 years ago

ehouais commented 11 years ago

I need to override a slider's default value (HTML "value" attribute) with a value coming from the localStorage. A simple solution would be to call simpleSlider("setValue", val) in a "ready" event handler. However, the "ready" event is fired when the SimpleSlider javascript object is ready, but before it's actually connected to the corresponding jQuery node. So the simpleSlider("setValue", val) on the jQuery node fails because it needs access to the SimpleSlider object.

2 possible turnarounds: