JS forms a mask Effect instance code of a page

Source: Internet
Author: User

  This article mainly introduces JS form a mask Effect instance code of the page, a friend in need can refer to the

Before using this forged code, please download the jquery Library   code as follows: var maskstackcount = 0;   Function Mask (method) { //This is the window you want to mask, I want to mask is an iframe window, you can also use var winobj=$ (window)   VAR winobj= window.top.$ ("Body"). Find ("Iframe[name= ' Dialognormaliframe ')");           if (typeof method = "undefined") {            method= "Ope n ";        }         if (method = = "Open") {          &NBSP ; if (maskstackcount <= 0) {                var mask = $ ("<div id= ' Window-mas K ' class= ' window-mask ' style= ' display:none ' ></div> '). Appendto ("body");                 MASK.CSS ({                    Width:     winobj.width () + "px",                     Height:     winobj.height () + "px",                     filter: "Alpha (opacity=60)"           &N Bsp    }). Show ();                     Winobj.on ("Resize.mask", function () {    & nbsp               MASK.CSS ({                        Width:     winobj.width () + "px",                         Height:     winobj.height () + "px"                    });                });                         maskstackcount++;        }         Else if (method = "Close") {          & nbsp maskstackcount--;             $ ("#window-mask"). Remove ();                 Winobj.off ("Resize.mask");        }}     

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.