ci_common/common

此包的最新版本(dev-master)没有提供许可证信息。

测试项目

维护者

详细信息

github.com/glren/test

源代码

问题

安装: 6

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

语言:JavaScript

dev-master 2017-08-31 08:53 UTC

This package is not auto-updated.

Last update: 2024-09-23 16:26:48 UTC


README

请在需要使用简单层的情况下使用。

要求

此库必须加载jQuery。

步骤.1 : 定义HTML文件

  • 1. 样式表应按照所需的层形状编写。
  • 2. HTML文件必须设置layerid、closeBtnClassName和inputClassName。
  • layerid : 包裹整个层的标签
  • closeBtnClassName : layerid的子元素,点击具有该类的元素可以关闭层。
  • inputClassName : layerid的子元素,具有该类的元素被选中后关闭则一天内不再显示层。
<style type="text/css">
.sl_layer{width:400px; height:400px;border:0px solid #2bA5B3;position:absolute;z-index:9999;left:100px;top:180px;display:none;}

.closeBox2 {position:absolute;left:0px;top:400px;height:20px;width:400px;background-color:#000000;margin-top:0;padding:0;}
.closeBox2 .closeLeft{float:left;padding-left:4px;margin-top:2px;}
.closeBox2 .closeRight{float:right;padding-right:10px;}
.closeBox2 .closeRight img{margin-top:1px;}
.closeBox2 .closeRight:after{clear:both;content:"";display:block;}

.top_cnts3{width:600px; height:400px;border:0px solid #2bA5B3;position:absolute;z-index:9999;left:530px;top:180px;display:none;}
</style>
<script src="PATH_TO_FILE_LOCATION/sl_layer.js" ></script>
<!-- 위 스크립트 파일은 저장된 위치를 직접 입력해주세요 -->
<div id="sample_layer" class="sl_layer">
	<a href="http://realclinic.co.kr/inquiry/notice_view.php?num=18" target="_parent">
		<img src="http://placehold.it/200x200">
	</a>
	<div class="closeBox2">
		<p class="closeLeft">
			<input style='border:0px' type='checkbox' class="nomorepop" name='chkbox' id='chkbox' >
			<a href="#!"><img src="./images/txt.png" alt="오늘하루 안보임?" /></a>
		</p>
		<p class="closeRight closeBtn"><a href="#!;"><img src="./images/exbtn.png" alt="btnclose" /></a></p>
	</div>
</div>

步骤.2 : 调用JAVASCRIPT

<script>
	var $layer = new layer({
		layerid : 'sample_layer',
		cookie_name : 'sample_pop_cookie_name',
		closeBtnClassName : 'closeBtn',
		inputClassName : 'nomorepop'
	})
</script>