Keywords:expose html,expose html jquery,javascript expose,stand out html javascript,javascript expose plugin
Description:Make your HTML elements stand out
Demo
Start entering text on the input fields below and you'll see the masking effect:
Username
Password
The story
Expose is a JavaScript tool that exposes selected HTML elements on the page so that the surrounding elements will gradually fade out. The exposing effect was first introduced in the overlay tool. Usually the effect is an integral part of the program and cannot be used separately. This tool takes the idea of exposing a little further. It is a separate tool that can be used as a general purpose masking utility. You can use it for overlays, forms, images, videos or Flash objects. You can use CSS to tweak the look of the mask.
Usage
Here are some most common ways of using the mask:
$(document).mask();
$(document).mask("#789");
$(document).mask{ closeOnEsc: false, closeOnClick: false });
$("div.to_be_exposed").expose();
$.mask.close();
There are two different calls: mask and expose. The mask method is only available for the document object and you cannot use any other selector. The expose() method can take any jQuery selector and all elements returned by the selector are placed on top of the mask.
The mask is loaded immediately after the expose or mask call. You can supply a different configuration on each call and the latest call is remembered. A subsequent expose call for example will use the previously used configuration if no arguments are given.
You can also use an existing element as a mask. By default the tool uses an element whose id is exposeMask and if it does not exist already exist then it will be created automatically.
Demos
We believe that the best way to learn is through demos. The following demos are fully documented and a standalone page is provided to get mask working on your site. It's really important to study the first demo "Minimal setup for mask" because it teaches you the basics of using the library.
Expose and Flowplayer demos
These demos show how to use a video player together with the mask tool:
Mask Graphics
You can use our graphics as the basis for your design. You can freely change the design as you see fit. Click the image on the right to download a zip file. Before using the graphics, you should consult the User's Guideon how graphics can be used when designing the look and feel of the tools.
Here are a few examples of what is included in the zip file:
Configuration
Here is a full list of available configuration options:
property
default
description
closeOnClick |
true |
Specifies whether the masking disappears when the mask is clicked. By default, this is set to true. |
closeOnEsc |
true |
Specifies whether masking disappears when the ESC key is pressed from the keyboard. By default, this is set to true. |
closeSpeed |
'fast' |
How quickly the mask disappears. Possible values are 'slow', 'normal' and 'fast or you can supply the number of milliseconds. For example, a value of 2000 will cause the mask to disappear in 2 seconds. By setting this to zero there is no animation and the mask disappears immediately. |
color |
'#fff' |
The background color of the mask. This will dramatically affect how it appears. If you supply a value of null here, you can control the background color with CSS. See themaskId property below for more information. |
loadSpeed |
'slow' |
How quickly the mask will appear. Possible values are 'slow', 'normal' and 'fast or you can supply the number of milliseconds. For example, a value of 2000 will cause the mask to appear in 2 seconds. By setting this to zero there is no animation and the mask appears immediately. |
maskId |
'exposeMask' |
The mask is a normal div element placed on top of your page and whose size is automatically adjusted to cover the user's screen completely. You can style it normally with CSS just like any other element on the page. By default, the mask's id is set to mask, but you can change that with tis configuration option. Since version 1.2.0 you can use an existing element as the mask if it's id matches the one given in this configuration option. |
opacity |
0.8 |
The transparency setting of the mask. A decimal value from 0 to 1. A bigger value means less transparency while a value of 0 is fully transparent (invisible). |
startOpacity |
0 |
since 1.2.0. The initial transparency level of the mask before it starts fading in to the desired opacity as specified by the opacity option. A decimal value from 0 to 1. A bigger value means less transparency while a value of 0 is fully transparent (invisible). For example, you can start with full opacity and gradually fade to a semi-transparent mask. |
zIndex |
9998 |
This is the z-index CSS property for the mask. The zIndex specifies the placement of the element along the z-axis of the document. The default zIndex value is very high, so it is unlikely that you will need to alter it; however, this value must be greater than the z-index of any other element on the page so that the overlay will always be visible when called. |
|
onBeforeLoad |
|
This callback function is triggered before the masking effect. Returning false or callingevent.preventDefault() in the callback prevents masking from occurring. |
onLoad |
|
This callback function is triggered after masking takes place. |
onBeforeClose |
|
This callback function is triggered before mask is closed. Returning false or callingevent.preventDefault() in the callback prevents it from closing. |
onClose |
|
This callback function is triggered when mask is closed. |
Here is an example of an onBeforeLoad callback function given in configuration. Inside any callback function the this variable is a pointer to the mask scripting API.
$("#mydiv").expose({
onBeforeLoad: function(event) {
this.getExposed().animate({width: '+=100'});
}
});
Note: unlike other jQuery Tools you can supply callbacks only from the configuration and you can assign only one callback for the same event.
Scripting API
Unlike other jQuery Tools in this library the mask is a singleton. Only one mask instance can exist at any given time. This singleton can be accessed directly with $.mask or via the this variable inside callback functions.
Method listing
method
return value
description/example
close() |
API |
Closes the mask. |
fit() |
API |
Forces the mask to fill the whole document. This is usually not needed since the tool itself does this. You'll need this on occasions when the mask is loaded and your document has grown in size in the meantime. |
isLoaded(fully) |
boolean |
Returns true if mask is loaded. Since 1.2.4 you can supply a boolean argument that makes sure that the function returns true only if the mask is fully visible in it's final position and opacity. |
getMask() |
jQuery |
Returns the mask as a jQuery object. You can use jQuery methods such as css oranimate to modify it. |
getExposed() |
jQuery |
Returns exposed elements (if any) as a jQuery object. |
getConf() |
Object |
Returns the masking configuration. |
原文地址:http://flowplayer.org/tools/toolbox/expose.html
分享到:
相关推荐
JQuery Tools系列中的Expose是一个非常实用的工具,它允许用户通过半透明层突出显示页面上的某个部分。这项技术通常用于突出页面上的某些信息或者在用户操作时提示用户注意特定内容。以下是对JQuery Tools Expose...
qvm-暴露端口 ... 要公开work VM的端口8000,请运行 user@dom0$ qvm-expose-port -a work 8000 ... 安装 您可以通过下载脚本来安装它。... user@dom0$ qvm-run --pass-io work 'cat qvm-expose-port' > qvm-expose-port
expose-loader器expose-loader器允许将模块(全部或部分)暴露于全局对象( self , window和global )。 有关兼容性问题的更多提示,请查看官方文档的 。 入门 首先,您需要安装expose-loader : $ npm install ...
FROM suadminwen/python3-ubuntu:latest WORKDIR /root/ RUN pip install pip2pi RUN mkdir -p /data/...EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] #CMD ["bash","run.sh"] #ENTRYPOINT ["bash","run.sh"]
#make && make install #/usr/local/mysql/bin/mysql_install_db --user=mysql #chown -R mysql /usr/local/mysql/var #/usr/local/mysql/bin/mysqld_safe & #/usr/local/mysql/bin/mysqladmin -u root password ...
在运行时公开GC!...npm i expose-gc 我希望我的GC具有全球性! require ( 'expose-gc' ) ; global . gc ( ) ; 我只想要一个功能,没有全局性! const gc = require('expose-gc/function'); gc();
运行docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 1234:12375 --name expose -t tobilg/expose-socket在Docker / Boot2Docker主机上docker run -d -v /var/run/docker.sock:/va
【jQuery Tools】是一个广泛应用于现代网页开发的前端框架,它主要基于jQuery库,为开发者提供了丰富的用户界面(UI)组件。这个"前端项目-jquery-tools.zip"文件包含了一个名为"jquerytools-master"的目录,这很...
**jQuery Tools UI Library** jQuery Tools 是一个开源的JavaScript库,专为增强HTML页面的用户体验而设计,特别是针对那些不支持现代Web技术的老式浏览器。它由Alex Libby编写的PDF文档详细介绍了这个库,该文档...
暴露 完全开源的ngrok替代品-用纯PHP编写。 文献资料 有关安装说明,深入的用法和部署详细信息,请查看。 安全 如果发现任何与安全相关的问题,请发送电子邮件至而不要使用问题跟踪器。 学分 ...MIT许可证(MIT)。...
<dwr:remote-javascript id="exampleServiceJS" create="true" expose="true"> <dwr:include method="exampleMethod"/> </dwr:remote-javascript> </beans> ``` 在上述配置中,`DwrSpringConfigurator`负责初始...
-- Add this line to expose `window.vlow.default` --> <!-- WARN: Make sure React is loaded before this line --> < script src =" vlow.min.js " > </ script > 概述 Vlow
客户持续性oc new-app java:8~...请检查 ) oc expose svc/sd-customer-eligibility{URL}/swagger-ui可以在以下{URL}/swagger-ui找到: {URL}/swagger-ui 为了设置Fuse控制台,创建一个服务,该服务将公开服务
除了基本的配置,`cors2.5.jar`还支持其他高级特性,如预检请求(Preflight request)、暴露头部(Access-Control-Expose-Headers)、携带凭证(Access-Control-Allow-Credentials)等。预检请求是CORS中的一种特殊...
38. **expose** / iks’pəuz/ - 使暴露;揭露:揭示隐藏的事实或把某物置于危险之中。 39. **during** / ‘djuəriŋ/ - 在…期间:介词,表示时间上的关联。 40. **nail** / neil/ - 钉;指甲 vt.钉:名词指金属钉...
The atom-ide-ui package to expose the functionality within Atom The language-vue package to ensure highlighting and activation within Vue files Development Clone this repo $ git clone ...
运行适配器$ docker run -d --name powerstrip-debug \ --expose 80 \ binocarlos/powerstrip-debug 在它自己的 shell 中运行调试适配器并保持连接是很方便的,这样你就可以在发出请求时看到它的输出: $ docker run...
4. **API增强**:增加了更多实用的方法和注解,比如@Expose注解,可以更灵活地控制哪些字段需要被序列化或反序列化。 #### 三、Gson 2.8.0依赖包使用 ##### 引入依赖 如果你使用Maven项目管理工具,可以在pom.xml...
4. **注解**:Gson提供了一系列注解,如`@Expose`用于标记要序列化的字段,`@SerializedName`用于指定JSON键名,`@JsonAdapter`用于自定义序列化和反序列化行为。 5. **Builder模式**:Gson提供了一个Builder类,...
`EXPOSE 8066 9066` `CMD ["/usr/local/mycat/bin/mycat", "console","&"]` 6. 构建 Mycat 镜像: `docker build -t mycat .` 7. 运行 Mycat 镜像: `docker run --name mycat -p 8066:8066 -p 9066:9066 -v /...