remediatingmanifestos / jquery-ui-for-ipad-and-iphone

Automatically exported from code.google.com/p/jquery-ui-for-ipad-and-iphone
0 stars 0 forks source link

Slider bug when zooming #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

Building this extension is a really great idea! :)

I just test it and there is a little error on the homepage :

Here is the good code for me :

$.extend($.support, {
          touch: typeof Touch == "object"
});

$.fn.addTouch = function()
{
          this.each(function(i,el){

                  //
                  // Hook up touch events
                  //

                  if ($.support.touch) {
                          el.addEventListener("touchstart", iPadTouchHandler, false);
                          el.addEventListener("touchmove", iPadTouchHandler, false);
                          el.addEventListener("touchend", iPadTouchHandler, false);
                          el.addEventListener("touchcancel", iPadTouchHandler, false);
                  }
          });
};

Also I have test it with the jqueryui slider widget and this is working great.

But there is just one annoying bug when zooming (even a little) :
the slider always output 0.

Hope this can help!

Original issue reported on code.google.com by doury.an...@gmail.com on 9 Nov 2010 at 11:33

GoogleCodeExporter commented 8 years ago
Can you tell me how can I integrate it with jQuery slider?

Original comment by edmond.q...@gmail.com on 20 Dec 2011 at 10:34

GoogleCodeExporter commented 8 years ago
I simply attached the addTouch() function to the slider object like this :

//create the slider
$('#mydivid').slider();

//add the touch utility
$('#mydivid').slider().addTouch();

Hope this can help!

Original comment by doury.an...@gmail.com on 5 Mar 2012 at 3:19