Now do the responsive website and encounter a problem:
The side bar on the head of the website starts, sliding down will appear blank, so, think of the body to prevent sliding
Search on the Internet a lot of ways, also not useful
Attention:
When you swipe the entire screen, your finger affects the browser's behavior, such as scrolling and zooming. So when you invoke the touch event, be careful to suppress zooming and scrolling.
1. Disable zooming
Set with meta meta tags.
<meta name= "viewport" content= "Target-densitydpi=320,width=640,user-scalable=no" >
2. Disable scrolling
Preventdefault is blocking the default behavior, and the default behavior of the touch event is scrolling.
Event.preventdefault ();
My troubleshooting steps are as follows:
Block default $ ("Body"). On ("Touchmove", function (event) {Event.preventdefault;}, False)
Sets the height of the body to the height of the window
$ ("body"). Height ($ (window). Height ());
JS Mobile Client-----Canceling sliding events (pro-Test)