Jquery thickbox pop-up layer plug-in

Source: Internet
Author: User

. THICKBOX supports the following browsers:
Windows IE 6.0, Windows IE 7 +, Windows FF 2.0.0.6 +, Windows Opera 9.0 +, Macintosh Safari 2.0.4 +, Macintosh FF 2.0.0.6 +, and Macintosh Opera 9.10 ...... However, according to my use, IE6 is still a problem! Next we will first look at its call:
1.you must download jquery.js and thickbox.js. thickbox.css!
Copy codeThe Code is as follows:
<Script type = "text/javascript" src = "path-to-file/jquery. js"> </script>
<Script type = "text/javascript" src = "path-to-file/thickbox. js"> </script>
<Link rel = "stylesheet" href = "path-to-file/thickbox.css" type = "text/css" media = "screen"/>
// Path-to-file is the path where you put the three files

2. How to bring up a single image:
Copy codeThe Code is as follows:
<A href = "images/single.jpg" title = "add a caption to title attribute/or leave blank" class = "thickbox"> </a>

3. pagination for multiple images is also simple:
Copy codeThe Code is as follows:
<A href = "images/plant1.jpg" title = "add a caption to title attribute/or leave blank" class = "thickbox" rel = "gallery-plants"> </a>
<A href = "images/plant2.jpg" title = "add a caption to title attribute/or leave blank" class = "thickbox" rel = "gallery-plants"> </a>
<A href = "images/plant3.jpg" title = "add a caption to title attribute/or leave blank" class = "thickbox" rel = "gallery-plants"> </a>
<A href = "images/plant4.jpg" title = "add a caption to title attribute/or leave blank" class = "thickbox" rel = "gallery-plants"> </a>

4. Pop-up page inLINECONTENT
Copy codeThe Code is as follows:
<Input alt = "# TB_inline? Height = 300 & width = 400 & inlineId = myOnPageContent "title =" add a caption to title attribute/or leave blank "class =" thickbox "type =" button "value =" Show "/>
// What is important? # TB_inline?

5. iFRAME format
Copy codeThe Code is as follows:
<A href = "ajax. PHP? KeepThis = true & TB_iframe = true & height = 250 & width = 400 "title =" add a caption to title attribute/or leave blank "class =" thickbox "> Example </>

All call style have to add class = "thickbox". This is the control of the pop-up effect, specific can refer to the JQUERY official site to THICKBOX introduction, which has the specific effect: http://jquery.com/demo/thickbox/

Related Article

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.