Q:

How do I get a jQuery Mobile slider for hexadecimal numbers?

I am trying to alter the behavior of the normal jQuery Mobile slider widget to display hexadecimal numbers. However, I don't get it to work.
The slider's slidestart and slidestop events aren't appropriate, since they only trigger at the start and stop of the interaction respectively.
So, I tried to bind a change handler to the input element of the slider instead.
$("input", slider).on("change", function() {
    // change the value of the input to hexadecimal...
});

Doesn't work either. Nothing happens. Is there a way to achieve this?

A:

Gajotres pointed me to a bug in my conversion code.
Binding a change handler to the input element of the slider was the right approach, though.
So for the sake of completeness (and others with the same problem) here is my final solution.
$("input", slider).on("change", function() {
    var number = parseInt(this.value);
    $(this).val(number.toString(16));
});

