-2

I am using the fullPage.js plugin and I can not zoom by pinching on my iPad. I have the following code:

$('#fullpage').fullpage({
    sectionsColor: ['#fff', '#fff', '#fff', '#fff', '#fff', '#fff'],
    anchors: ['home', 'concertation', 'essences', 'jeVote', 'lastPage'],
    loopHorizontal: false, menu: '#menu',
    slidesNavigation: true, slidesNavPosition: 'bottom',
    scrollingSpeed: 700,
    css3: true,
    keyboardScrolling: false,
    touchSensitivity: 1
})

Could anyone help me out? Thanks a lot!

Noble Mushtak
  • 1,684
  • 8
  • 22
Mahmoud
  • 722
  • 10
  • 22
  • 1
    Can you please give us an example of your code? – Noble Mushtak Apr 20 '15 at 14:18
  • i just use a plugin fullpage.js `$('#fullpage').fullpage({ sectionsColor: ['#fff', '#fff', '#fff', '#fff', '#fff', '#fff'], anchors: ['home', 'concertation', 'essences', 'jeVote', 'lastPage'], loopHorizontal: false, menu: '#menu', slidesNavigation: true, slidesNavPosition: 'bottom', scrollingSpeed: 700, css3:true, keyboardScrolling: false, touchSensitivity:1}` – Mahmoud Apr 20 '15 at 14:27

1 Answers1

1

I just implement the pinch to zoom in javascript by putting the following code.

$(document).ready(function() { 

    var scale = 0.7; // initial-scale
    var r = 0.10;

    $(document).bind('gesturechange',function(event){

        if(event.originalEvent.scale > 1) scale = scale < 1.2 ?  scale+r : 1.2 ;
        else scale = scale > 0.7 ? scale-r : 0.7 ;

        $('meta[name=viewport]').attr('content', 'width=device-width, minimum-scale='+ scale.toFixed(2) +', maximum-scale='+ scale.toFixed(2) +', user-scalable=yes'); // 

    });
});

and it works perfectly.

Mahmoud
  • 722
  • 10
  • 22