layui-layer independent component-pop-up layer introduction

Release: 2019-12-11 16:48:11
forward
2512 people have browsed it

layui-layer independent component-pop-up layer introduction

[Notes]

1. When using, please place the entire folder layer in any directory of your site, and just introduce layer.js. , except for jQuery, other files do not need to be introduced.

2. If your js import is processed through merging or you do not want to use the absolute path automatically obtained by layer, you can configure it through layer.config() (see the official website API page for details)

3. jquery requires 1.8

After downloading the layer, deploy it to any directory in your project (of course, we recommend placing it in the front-end related directory). You cannot move the file structure in the layer. Because they are an inseparable combination. Like this: (Special note: You need to introduce the entire layer folder into your file, not just the layer.js file)

layui-layer independent component-pop-up layer introduction

You don’t have to worry about those files What is it for? You only need to identify one file: layer.js. That’s right, when you try to present the layer on the page, you should do it like this: (the simplest example)

       
点我
Copy after login
$("#btn").bind("click",function(){ //layer.msg('点我的人最美!'); layer.msg('此商品不存在或者已下架,看看其他商品吧!', { time: 3000 }); });
Copy after login

More Example:

       
点我.btn
点我test2
点我parentIframe
点我test4
点我test5
Copy after login
       
点我.btn
点我test2
点我parentIframe
点我test4
点我test5
点我test6
点我test7
点我test8
点我test9
Copy after login

For more layui knowledge, please pay attention to thelayui usage tutorialcolumn.

The above is the detailed content of layui-layer independent component-pop-up layer introduction. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!