jquery-simple-slider icon indicating copy to clipboard operation
jquery-simple-slider copied to clipboard

"slider:ready" event does not fire

Open sandeepy02 opened this issue 12 years ago • 3 comments

I am displaying text instead of data value in my data slider. It works fine, but somehow the "slider:ready" event does not fire i.e. at the initiation there is no text displayed till I first drag the slider. In fact I console the data.value which also does not get published till I change slider.

My Code: $("[data-slider]") .each(function () { var input = $(this); $("") .addClass("output") .insertAfter($(this)); }) .bind("slider:ready slider:changed", function (event, data) { var output="t1"; console.log(data.value); switch(data.value.toFixed(0)) { case '0': output="t0"; break; case '1': output="t1"; break; case '2': output="t2"; break; case '3': output="t3"; break; case '4': output="t4";break; case '5': output="t5"; break; } $(this) .nextAll(".output:first") .html(output); });

sandeepy02 avatar Mar 09 '13 03:03 sandeepy02

$("[data-slider]")[0].nextSibling.innerText="t0"; worked for me

sandeepy02 avatar Mar 09 '13 06:03 sandeepy02

Line 109 of the source: this.input.trigger("slider:ready", {

It looks like you need an input in order for the "slider:ready" event to fire. Look at your html and change it from something like:

to:

Hopefully that will work.

jlee614 avatar Jul 20 '13 19:07 jlee614

change it from something like: ??? to: ???

Heu... aren't you missing something in your last post? Thanks.

julienxaop avatar Oct 01 '13 14:10 julienxaop