Home Web Front-end JS Tutorial jQuery-Tools-overlay usage introduction_jquery

jQuery-Tools-overlay usage introduction_jquery

May 16, 2016 pm 05:51 PM

复制代码 代码如下:




jQuery Tools standalone demo



href="./overlay-basic.css"/>











The Barcelona Pavilion


Barcelona, Spain



The Barcelona Pavilion, designed by Ludwig Mies van der Rohe,
was the German Pavilion for the 1929 International Exposition in
Barcelona, Spain. It was an important building in the history of
modern architecture.



Several critics, historians and modernists have declared it "the
most beautiful building of the century"







The Barcelona Pavilion


Barcelona, Spain



Another unique feature of this building is the exotic
materials Mies chose to use
.



Plates of high-grade stone materials like veneers of Tinos verde
antico marble and golden onyx as well as tinted glass of grey,
green, white, in addition to translucent glass, perform
exclusively as spatial dividers.




<script> <br>$(document).ready(function() { <br>$("img[rel]").overlay({ <br>closeOnClick:false, <br>mask: 'darkred' <br>}); <br>}); <br></script>



CSS
复制代码 代码如下:

/* the overlayed element */
.simple_overlay {
/* must be initially hidden */
display:none;
/* place overlay on top of other elements */
z-index:10000;
/* styling */
background-color:#333;
width:675px;
min-height:200px;
border:1px solid #666;
/* CSS3 styling for latest browsers */
-moz-box-shadow:0 0 90px 5px #000;
-webkit-box-shadow: 0 0 90px #000;
}
/* close button positioned on upper right corner */
.simple_overlay .close {
background-image:url(./close.png);
position:absolute;
right:-15px;
top:-15px;
cursor:pointer;
height:35px;
width:35px;
}

关闭的css的命名: xxx .close

以下列出的是所有可用的属性选项:
属性 默认值 描述
close   一个jQuery选择器内结束元素 叠加。 这些可以是任何元素,例如链接、按钮或 图像。 如果这不是提供的、亲密的元素 自动生成的。 阅读更多关于此 在 定义关闭行动
closeOnClick <span id="OUTFOX_JTR_TRANS_NODE-67" class="OUTFOX_JTR_TRANS_NODE">true </span> 默认情况下,重叠是当鼠标关闭或者 点击区域外。  适合 模态 对话框
closeOnEsc <span id="OUTFOX_JTR_TRANS_NODE-76" class="OUTFOX_JTR_TRANS_NODE">true </span> 默认情况下,覆盖网络时关闭键盘ESC键
effect <span id="OUTFOX_JTR_TRANS_NODE-81" class="OUTFOX_JTR_TRANS_NODE"><span>'default'</span> </span>

效果时要使用打开包裹, 关闭。 这可以戏剧性地改变的行为 叠加。 默认情况下这个工具使用一种叫做'default'的影响 这是一个简单的显示/隐藏效果。

以下列出的是现在 可用 效果 你也可以 做你自己的 效果

fixed <span id="OUTFOX_JTR_TRANS_NODE-89" class="OUTFOX_JTR_TRANS_NODE"><span>true</span></span> 自从1.2.0 。 保持在相同的是否覆盖 位置,而屏幕滚动。 这是默认 适合所有浏览器的行为除了IE6和下面。 IE6不 支持固定位置。 如果这个属性设置 false 然后是定位在覆盖的 关系到文档,以便在屏幕上滚动 然后叠加与文档一起移动。
mask   之前被称为 暴露 。 覆盖很 经常配合使用 这个 面具工具 。 因为 这样,支持这个特性已经内嵌式 工具。 这个选项接受 这个 面具 配置 。 这不是一个简单的字符串指定 面具的背景颜色或更复杂的对象文字 指定更多的配置变量。

看到的一个例子 叠加 连同面具 。 默认情况下屏蔽是禁用的。

left "center" 指定多远从左边的屏幕的边缘了 叠加应放置。 默认情况下,横向包裹 集中值为"center",但你也可以提供一个 数值指定的距离以像素为单位。
load false 自从1.2.0 。 如果启用了然后覆盖的负载 后立即被初始化。
oneInstance <span id="OUTFOX_JTR_TRANS_NODE-113" class="OUTFOX_JTR_TRANS_NODE">true</span> 默认情况下,只可以有一个叠加在页面。 将这个属性设置为 允许您 有 多个 叠加实例
speed 'normal' 淡入的速度动画的'normal' 效果。 有效值是 'slow', 'normal' 和 'fast',或者你也可以 提供一个数值(以毫秒为单位)。 通过设置这个 属性为0,则会出现滚动立即没有任何 动画。
target   日程表的元素中指定的(如果不是 这个 rel 属性的触发元素)。
top '10%' 指定如何远离屏幕的顶部边缘的叠加 应放置。 可接受的值是一个整数 指定一个距离(以像素为单位),一个字符串(如“15%”) 指定百分比值或“中心”在这种情况下 叠加是垂直居中。 百分数工作 一直保持在不同的屏幕分辨率。

事件
确保你已经阅读 大约 事件 jQuery工具 。 所有事件监听器接收 这个 事件 对象 作为第一个参数并没有其他参数 为叠加。
事件 什么时候发生的?
onBeforeLoad 叠加显示之前。 叠加已经 定位在该位置将从那里开始动画。
onload 当叠加已经完全被显示
onBeforeClose 关闭之前的叠加
onClose 当叠加是关闭的
Scripting API
First make sure you understand yourself with the jQuery scripting tool. Listed below are all available API methods:
方法 返回值类型 描述
close() Overlay 关闭叠加。
getClosers() <span id="OUTFOX_JTR_TRANS_NODE-157" class="OUTFOX_JTR_TRANS_NODE">jQuery </span> 返回结束元素(s)作为一个jQuery对象。
getConf() <span id="OUTFOX_JTR_TRANS_NODE-160" class="OUTFOX_JTR_TRANS_NODE">对象 </span> 将配置为叠加。
getOverlay() <span id="OUTFOX_JTR_TRANS_NODE-163" class="OUTFOX_JTR_TRANS_NODE">jQuery </span> 返回元素作为一个jQuery对象日程表。
getTrigger() <span id="OUTFOX_JTR_TRANS_NODE-166" class="OUTFOX_JTR_TRANS_NODE">jQuery </span> 返回元素作为一个jQuery对象触发。
isOpened() boolean 返回 真正的 如果打开包裹。
load() Overlay 打开叠加。  
I will update the time tomorrow and draw a sentence for this.

Tab: Portal
Tab (slideshow): Portal
Tooltip: Portal
Overlay: Portal
Dateinput: Portal
Working on framework 2 on Ctrip .0, but what I was studying was framework 4.0. What were I thinking at the time? T.T. It’s all old TMD technology and piles of code
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Replace String Characters in JavaScript Replace String Characters in JavaScript Mar 11, 2025 am 12:07 AM

Detailed explanation of JavaScript string replacement method and FAQ This article will explore two ways to replace string characters in JavaScript: internal JavaScript code and internal HTML for web pages. Replace string inside JavaScript code The most direct way is to use the replace() method: str = str.replace("find","replace"); This method replaces only the first match. To replace all matches, use a regular expression and add the global flag g: str = str.replace(/fi

Build Your Own AJAX Web Applications Build Your Own AJAX Web Applications Mar 09, 2025 am 12:11 AM

So here you are, ready to learn all about this thing called AJAX. But, what exactly is it? The term AJAX refers to a loose grouping of technologies that are used to create dynamic, interactive web content. The term AJAX, originally coined by Jesse J

10 jQuery Fun and Games Plugins 10 jQuery Fun and Games Plugins Mar 08, 2025 am 12:42 AM

10 fun jQuery game plugins to make your website more attractive and enhance user stickiness! While Flash is still the best software for developing casual web games, jQuery can also create surprising effects, and while not comparable to pure action Flash games, in some cases you can also have unexpected fun in your browser. jQuery tic toe game The "Hello world" of game programming now has a jQuery version. Source code jQuery Crazy Word Composition Game This is a fill-in-the-blank game, and it can produce some weird results due to not knowing the context of the word. Source code jQuery mine sweeping game

How do I create and publish my own JavaScript libraries? How do I create and publish my own JavaScript libraries? Mar 18, 2025 pm 03:12 PM

Article discusses creating, publishing, and maintaining JavaScript libraries, focusing on planning, development, testing, documentation, and promotion strategies.

jQuery Parallax Tutorial - Animated Header Background jQuery Parallax Tutorial - Animated Header Background Mar 08, 2025 am 12:39 AM

This tutorial demonstrates how to create a captivating parallax background effect using jQuery. We'll build a header banner with layered images that create a stunning visual depth. The updated plugin works with jQuery 1.6.4 and later. Download the

Getting Started With Matter.js: Introduction Getting Started With Matter.js: Introduction Mar 08, 2025 am 12:53 AM

Matter.js is a 2D rigid body physics engine written in JavaScript. This library can help you easily simulate 2D physics in your browser. It provides many features, such as the ability to create rigid bodies and assign physical properties such as mass, area, or density. You can also simulate different types of collisions and forces, such as gravity friction. Matter.js supports all mainstream browsers. Additionally, it is suitable for mobile devices as it detects touches and is responsive. All of these features make it worth your time to learn how to use the engine, as this makes it easy to create a physics-based 2D game or simulation. In this tutorial, I will cover the basics of this library, including its installation and usage, and provide a

Auto Refresh Div Content Using jQuery and AJAX Auto Refresh Div Content Using jQuery and AJAX Mar 08, 2025 am 12:58 AM

This article demonstrates how to automatically refresh a div's content every 5 seconds using jQuery and AJAX. The example fetches and displays the latest blog posts from an RSS feed, along with the last refresh timestamp. A loading image is optiona

How do I optimize JavaScript code for performance in the browser? How do I optimize JavaScript code for performance in the browser? Mar 18, 2025 pm 03:14 PM

The article discusses strategies for optimizing JavaScript performance in browsers, focusing on reducing execution time and minimizing impact on page load speed.

See all articles