0

This works perfectly on a computer, the value never fails and I always get a correct reading. However, on the iPad, if I am holding or sliding the slider, the value will show zero until I let go of it. I am using jQuery UI Touch Punch for the iPad capabilities (http://touchpunch.furf.com/)

I really have no idea on what's going on. Please do note that the rate on the screen does show the correct value, it's only the variable that takes the zero value.

Thank you for your help!

Here's my code:

$(function() { //Set up slider
    $( ".slider" ).slider({
           range: "min",
           value: 50,
           min: 0,
           max: 100,
           step: 1,

           //this gets a live reading of the value and prints it on the page
           slide: function( event, ui ) {
               $( "#ResultRate" ).text( ui.value );
           }
    });
    $('#slider').draggable(); //Add touch screen (i.e. iPad, iPhone, Android) support for the slider
});

//THIS PART GETS THE READING EVERY 1000ms USING setInterval from the the slider

var TheRate = $('.slider').slider("option", "value");

rockamic
  • 151
  • 1
  • 2
  • 11
  • After searching for an answer for hours... I just noticed that the .draggable is going after a div and not a class (it does drag though). That shouldn't have any effect but I will try it as soon as I get my hands on an iPad. – rockamic Aug 13 '12 at 13:52
  • I fixed the .slider ; nothing is fixed so far. I am thinking this could be a processing power issue. There is a dynamic chart and when the readings get worse, the chart also lags. I will get a CPU usage monitoring tool for iPad. – rockamic Aug 15 '12 at 20:19
  • Problem found! Disabling highcharts completely (didn't try disable only chart updates) completely fixed it (by lowering CPU usage). I guess the iPad does not like highcharts or the way I am using it. – rockamic Aug 16 '12 at 13:43

0 Answers0