jQuery-Tools-overlay usage introduction_jquery
href="./overlay-basic.css"/>


<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 | 当叠加是关闭的 |
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 | 打开叠加。 |
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

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











JavaScript is the cornerstone of modern web development, and its main functions include event-driven programming, dynamic content generation and asynchronous programming. 1) Event-driven programming allows web pages to change dynamically according to user operations. 2) Dynamic content generation allows page content to be adjusted according to conditions. 3) Asynchronous programming ensures that the user interface is not blocked. JavaScript is widely used in web interaction, single-page application and server-side development, greatly improving the flexibility of user experience and cross-platform development.

The latest trends in JavaScript include the rise of TypeScript, the popularity of modern frameworks and libraries, and the application of WebAssembly. Future prospects cover more powerful type systems, the development of server-side JavaScript, the expansion of artificial intelligence and machine learning, and the potential of IoT and edge computing.

Different JavaScript engines have different effects when parsing and executing JavaScript code, because the implementation principles and optimization strategies of each engine differ. 1. Lexical analysis: convert source code into lexical unit. 2. Grammar analysis: Generate an abstract syntax tree. 3. Optimization and compilation: Generate machine code through the JIT compiler. 4. Execute: Run the machine code. V8 engine optimizes through instant compilation and hidden class, SpiderMonkey uses a type inference system, resulting in different performance performance on the same code.

Python is more suitable for beginners, with a smooth learning curve and concise syntax; JavaScript is suitable for front-end development, with a steep learning curve and flexible syntax. 1. Python syntax is intuitive and suitable for data science and back-end development. 2. JavaScript is flexible and widely used in front-end and server-side programming.

JavaScript is the core language of modern web development and is widely used for its diversity and flexibility. 1) Front-end development: build dynamic web pages and single-page applications through DOM operations and modern frameworks (such as React, Vue.js, Angular). 2) Server-side development: Node.js uses a non-blocking I/O model to handle high concurrency and real-time applications. 3) Mobile and desktop application development: cross-platform development is realized through ReactNative and Electron to improve development efficiency.

This article demonstrates frontend integration with a backend secured by Permit, building a functional EdTech SaaS application using Next.js. The frontend fetches user permissions to control UI visibility and ensures API requests adhere to role-base

I built a functional multi-tenant SaaS application (an EdTech app) with your everyday tech tool and you can do the same. First, what’s a multi-tenant SaaS application? Multi-tenant SaaS applications let you serve multiple customers from a sing

The shift from C/C to JavaScript requires adapting to dynamic typing, garbage collection and asynchronous programming. 1) C/C is a statically typed language that requires manual memory management, while JavaScript is dynamically typed and garbage collection is automatically processed. 2) C/C needs to be compiled into machine code, while JavaScript is an interpreted language. 3) JavaScript introduces concepts such as closures, prototype chains and Promise, which enhances flexibility and asynchronous programming capabilities.
