How to disable bouncing in html5 fullscreen iphone app?

后端 未结 3 547
感动是毒
感动是毒 2021-01-02 21:44

I want to make html5 fullscreen app. I made a page and added it as an icon to my iphone. I added metatags:

 

        
3条回答
  •  死守一世寂寞
    2021-01-02 22:43

    Extending dmanxii's approach here is what we are doing.

        $("body").on("touchmove", function (event) {
            if ($(event.target).is(".WhatEverClass") || $(event.target).parentsUntil().is(".ParentClass")) {
                //console.log("NOT Disabled"); 
            }
            else {
                //console.log("Disabled"); 
                event.preventDefault();
            }
        });
    

提交回复
热议问题