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. MongoDB Change Stream:简介、尝试与应用

    在MongoDB3.6引入的新feature中,change stream无疑是非常吸引人的. Change streams allow applications to access real-tim ...

  2. 移除Windows图标快捷方式小箭头

    以管理员身份运行cmd,输入 reg delete "HKEY_CLASSES_ROOT\lnkfile" /v IsShortcut /f & taskkill /f / ...

  3. Golang常见误区(二)

    35. 关闭 HTTP 的响应体 使用 HTTP 标准库发起请求.获取响应时,即使你不从响应中读取任何数据或响应为空,都需要手动关闭响应体.新手很容易忘记手动关闭,或者写在了错误的位置: // 请求失 ...

  4. Github经理和员工开发

    Git简介 Git是目前世界上最先进的分布式版本控制系统 git的两大特点: 版本控制:可以解决多人同时开发的代码问题,也可以解决找回历史代码的问题 分布式:Git是分布式版本控制系统,同一个Git仓 ...

  5. EQueue

    EQueue 2.3.2版本发布(支持高可用) - dotNET跨平台 - CSDN博客https://blog.csdn.net/sD7O95O/article/details/78097193 E ...

  6. 删除 node_modules文件夹cmd指令

    方法一: npm install rimraf -g rimraf node_modules 方法二: rmdir /s/q your_app_dir 方法三: rm -f /node_modules

  7. golang函数

    一.函数语法 func 函数名(形参列表) (返回值列表){ ...... return 返回值 } 例如: package main import "fmt" func test ...

  8. 洛谷 P1088 火星人

    https://www.luogu.org/problemnew/show/P1088 这个题一开始是很蒙的 感觉很麻烦,每次都要交换balabala..... 后来才知道有这么一个神奇的stl 真是 ...

  9. Vue实现tab选项卡

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  10. linux 安装所有软件可以使用这个网站搜索RPM包

    #很方便很实用  强烈推荐 https://pkgs.org/