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");