jQuery Mobile slider event
===

Developing a mobile web app with:

- jquery 1.7.1
- jquery-mobile 1.1.1
- Rails 3.2.1

Here, I intended to change content of time indicator (&lt;span id="wake_up_time_display"&gt;) as the value of slider changes.

Folloing works when the target url is directly called.

But in many occasions when jQuery mobile displays &lt;div data-role="page"&gt;, the indicator remains unchanged. (Value of the slider itself changes.)


    <label class="select" for="daily_record_wakeup_time">I'll wake up at: </label>
    <span id="wake_up_time_display"> 6:00</span>
    <input data-theme="e" data-track-theme="d" id="daily_record_wakeup_time" max="480" min="240" name="daily_record[wakeup_time]" step="15" type="range" value="360" />
    <script>
    $("input[id='daily_record_wakeup_time']").live ("slidercreate", function () {
      $("input[id='daily_record_wakeup_time']").bind ("change", function (event) {
        $("#wake_up_time_display").text 
          (Math.floor($(this).val() / 60)+":"+($(this).val() % 60 < 10 ? "0":"")+$(this).val() % 60);
      });
    });
    </script>