Micro-mail Browser pop-up box slide when the page follows the implementation code to slide (compatible with Android and iOS side) _android

Source: Internet
Author: User

In the micro-letter development encountered this problem: the micro-trust browser pop-up box slide when the page follows.

I think this is a problem with the following lines of code:

var $body = $ (' body '),
Dialogisinview =!1,//Current is not a dialog
lastcontentcontainerscrolltop = -1,//for pop-up box to prevent content from scrolling
$ Contentcontainer = $ (' #content-container ');//Content Container
//Block Window scrolling
function Stopwindowscroll () {
Dialogisinview = true;
Prevent page scrolling
lastcontentcontainerscrolltop = $body. scrolltop ();
$contentContainer. addclass (' Overflow-hidden '). css ({
' height ': $window. Height (),
' margin-top ':- Lastcontentcontainerscrolltop
});
Restore window scrolling
function Revertwindowscroll () {
Dialogisinview =! 1;
Restore page scrolling
$contentContainer. css ({
' height ': ' Auto ',
' margin-top ': 0
}). Removeclass (' Overflow-hidden ');
$body. scrolltop (lastcontentcontainerscrolltop);

Here is a request, content and element is id= "Content-container".

Below to everyone said Han:

Micro-mail browsers in Android and iOS in the form is not the same, in the final analysis is the Android side of the QQ browser core X5,ios end of the Apple browser to open the kernel WebKit.

The above is a small set to introduce the micro-letter browser pop-up box sliding when the page followed the implementation of sliding code (compatible with Android and iOS), I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.