1.Jquery Utility

<1> Type & Function & setTimeOut

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="../../jquery/jquery-3.2.1.min.js"></script>
</head>
<body> <h1>Type test Functions demo</h1>
<div id="output"></div> <script type="text/javascript">
function addText() {
$('#output').append('HelloWorld<br>');
} function callAnotherFunction(times, delay, func) {
var otimes = $.isNumeric(times)? times:3;
var odelay = $.isNumeric(delay)? delay:300;
if(!$.isFunction(func)){
return false;
} var i = 0;
(function loopIt() {
i++;
func();
if(i<times){
setTimeout(loopIt,delay);
}
})();
} $(document).ready(function () {
callAnotherFunction(3,300,addText);
}) </script>
</body>
</html>

N,多折叠板子

html:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="../jquery-3.2.1.min.js"></script>
<link rel="stylesheet" href="cp_01.css">
</head>
<body> <div class="collapse-body">
<div class="clk-dialog">
<h1>Collapse 01</h1>
<p>Hello this is my all text here .button margin,padding,border should 0,
必须要学习dom编程 RTFM RTFM,RTFM,RTFM</p>
</div> <div class="clk-dialog">
<h1>Collapse 02</h1>
<p>Hello this is my all text here .button margin,padding,border should 0,
必须要学习dom编程 RTFM RTFM,RTFM,RTFM</p>
</div> <div class="clk-dialog">
<h1>Collapse 03</h1>
<p>Hello this is my all text here .button margin,padding,border should 0,
必须要学习dom编程 RTFM RTFM,RTFM,RTFM</p>
</div> <div class="clk-dialog">
<h1>Collapse 04</h1>
<p>Hello this is my all text here .button margin,padding,border should 0,
必须要学习dom编程 RTFM RTFM,RTFM,RTFM</p>
</div>
</div> <script src="cp_01.js"></script>
</body>
</html>

css:

body{
background-color: #222222;
} .collapse-body{
/*position: relative;
margin: auto;*/
border: 1px solid #699;
/*vertical-align: middle;*/ } .clk-dialog{
display: block;
font-family: Consolas;
color: white; } .clk-dialog h1{
background: darkorange;
border: 1px solid #222222;
padding:;
margin:;
text-align: center; }
.clk-dialog p{
margin:;;
padding:;
border-bottom: 1px solid darkcyan;
}

js:

$(document).ready(function () {
var dialog = $('.clk-dialog');
var h1 = $('div.clk-dialog h1');
var text = $('div.clk-dialog p'); /*
$(h1).click(function () {
$(text).slideToggle(500);
});*/ $(dialog).each(function () {
console.log($(this));
var jq_h1 = $(this).children("h1");
var jq_p = $(this).children("p");
$(jq_h1).click(function () {
$(jq_p).slideToggle(500);
})
})
});

JQuery Advanced的更多相关文章

  1. 4月份本周超过 10 款最新免费 jQuery 插件

    分享 <关于我> 分享  [中文纪录片]互联网时代                 http://pan.baidu.com/s/1qWkJfcS 分享 <HTML开发MacOSAp ...

  2. Advanced Customization of the jQuery Mobile Buttons | Appcropolis

    Advanced Customization of the jQuery Mobile Buttons | Appcropolis Advanced Customization of the jQue ...

  3. JQuery文件上传插件ajaxFileUpload在Asp.net MVC中的使用

    0 ajaxFileUpload简介 ajaxFileUpload插件是一个非常简单的基于Jquery的异步上传文件的插件,使用过程中发现很多与这个同名的,基于原始版本基础之上修改过的插件,文件版本比 ...

  4. jQuery演示8种不同的图片遮罩层动画效果

    效果预览 下载地址 jQuery插件大全 实例代码 <div class="container"> <h1>jQuery图标和文章动画效果</h1&g ...

  5. 2016年4月最佳的20款 jQuery 插件推荐

    这个列表包括20个我们觉得是最有用的免费的 jQuery 插件,它们都是最具创新性和最省时省力的解决方案,很多都是现代化的设计和开发中碰到的问题的处理方案.如果你熟悉下面列出的任何插件,请与我们的读者 ...

  6. Web jquery表格组件 JQGrid 的使用 - 5.Pager翻页、搜索、格式化、自定义按钮

    系列索引 Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引 Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数.ColModel API.事件 ...

  7. jQuery treetable【表格多重折叠树功能及拖放表格子元素重新排列】

    今天有个表格需求做到多重折叠子元素功能,仔细想了下实现原理, 1.在html中,把父子节点的关系写在自定义属性,但对于节点是否有孩子(hasChild),是否是最后一个节点(isLastOne),是否 ...

  8. jQuery自定义滚动条样式插件mCustomScrollbar

    如果你构建一个很有特色和创意的网页,那么肯定希望定义网页中的滚动条样式,这方面的 jQuery 插件比较不错的,有两个:jScrollPane 和 mCustomScrollbar. 关于 jScro ...

  9. 基于Jquery、JqueryUI插件编写

    刚开始编写jquery插件的时候,只是从网上找个模板看着写,并不理解.刚刚仔细把官网的API看了下,突然觉得豁然开朗了.马上放假了想着应该整理整理不然忘了又. How to create a Jque ...

随机推荐

  1. easyui-tab标签

    一. 加载方式 //class 加载方式<div id="box" class="easyui-tabs" style="width:500px ...

  2. PS制作漂亮紫色霓虹灯光文字

    一.新建画布,大小1500 * 950像素,分辨率为300,置入墙壁图像,大小适合. 二.调整图层的色阶,色相/饱和度. 三.新建文字图层,颜色为#a33e88,大小为103,字体为Beon Medi ...

  3. centos系统java后台运行(xshll关掉不至于jar程序结束)

    这样执行,就可以后台运行java程序 nohup java -Dfile.encoding=UTF-8 -jar xxx.jar  & 后台内容在该目录下nohup .out文件内,netst ...

  4. DEVOPS 运维开发系列

    DEVOPS 运维开发系列四:ITIL事态管理流程.事态监控系统设计以及基于Devops的效率提升实践 - watermelonbig的专栏 - CSDN博客https://blog.csdn.net ...

  5. Mac之brew使用

    brew : 终端程序管理工具 能让你更快速的安装你想要的工具.而不用考虑大量的依赖. 安装命令 给官网的一样也可以自己去官网查看 它就类似于centos下的yum 和 Ubuntu下的apt-get ...

  6. Monkey简介

    Monkey简介 在Android的官方自动化测试领域有一只非常著名的“猴子”叫Monkey,这只“猴子”一旦启动,就会让被测的Android应用程序像猴子一样活蹦乱跳,到处乱跑.人们常用这只“猴子” ...

  7. js 实现的页面图片放大器以及 event中的诸多 x

    背景: 淘宝.天猫等电商网站浏览图片时可以查看大图的功能: 思路: 思路很简单,两张图片,一张较小渲染在页面上,一张较大是细节图,随鼠标事件调整它的 left & top; 需要的知识点: o ...

  8. jsp篇 之 脚本元素

    jsp的脚本元素 : 第一种:表达式 (类似输出语句) 表达式 形式:<%= %> 看源码发现[翻译]到java文件中的位置: [out.print(..)]里面的参数. 所以System ...

  9. Ubuntu和Windows双系统的安装

    本菜鸡的ACM生涯大概是结束了 最有希望的EC和焦作也顺利的铁了,一路走来还是怪自己不努力,整日整日的划水,算了,铁牌退役,也是自己应有的惩罚,静下心来吧 下面介绍如何装windows10和Ubunt ...

  10. 基于USB网卡适配器劫持DHCP Server嗅探Windows NTLM Hash密码

    catalogue . DHCP.WPAD工作过程 . python Responder . USB host/client adapter(USB Armory): 包含DHCP Server . ...