jquery Pop-up layer plugin Thickbox usage experience

Source: Internet
Author: User

Some time ago in the Construction Bank project with ext complete a single page system, too rushed, did not record anything, now forget, blame pity. This project uses jquery to do JS stuff. The main use of a pop-up layer control Thickbox, I also expanded and modified a bit. Here to write down, also provide you to download, I hope to be useful to everyone.

Thickbox official website (with examples and basic methods of use): http://jquery.com/demo/thickbox/

In the course of my use, Thickbox frequently asked questions:

1. The pop-up layer across the IFRAME.

Symptom (s): Every time the Thickbox is only popped in a frame, it will not cover the entire screen.

Reasons and Solutions:

Thickbox uses the Tb_show () function to add a pop-up layer behind the body. You can use Window.top.tb_show () to add a pop-up layer to the page. My Tihickbox plugin is modified as follows: Replace Tb_show (T,A,G) with the following in Tb_init ()

if(a.indexOf ('TB_iniframe') != -1)
{
window.top.tb_show(t,a,g);
}
else
{
tb_show(t,a,g);
}

So just add tb_iniframe=true to the original link, such as div.aspx? Height=180&width=400&tb_iframe=true&tb_iniframe=true&modal=true

2.thickbox support only one layer of pop-up, can not support multi-layer pop-up.

The modified control has been supported (insufficient: invalid IE6 under the expiration of the failed pop-up layer, accounting for the time is not resolved, haha)

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.