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. logrotate日志处理

    介绍 logrotate旨在简化生成大量日志文件的系统的管理.它允许日志文件的自动轮换.压缩.删除和邮件.每个日志文件可以每天.每周.每月处理,也可以在它变得太大时处理.通常,logrotate作为每 ...

  2. openstack-mitaka部署

    详见我在51cto的一篇博客:http://egon09.blog.51cto.com/9161406/1839667

  3. c#, AOP动态代理实现动态权限控制(一)

    因最近工作需要一个动态的权限配置功能,具体实现逻辑是c#的动态代理功能,废话不多说,直接干货.需求: 用户分为管理员.普通用户 不同用户拥有不同功能权限 用户的权限可配置 新增功能时,不用修改权限配置 ...

  4. Leetcode 21. Merge Two Sorted Lists(easy)

    Merge two sorted linked lists and return it as a new list. The new list should be made by splicing t ...

  5. MySQL CONCAT opposite

    csv - What is the opposite of GROUP_CONCAT in MySQL? - Stack Overflowhttps://stackoverflow.com/quest ...

  6. instanceof关键字的理解

    instanceof,两个单词组成,instance of,意为, "… 是 …的实例". 本身包含null值的判断.但是有不少人,先来个 obj != null,然后来个 obj ...

  7. 关于oracle sql语句查询时表名和字段名要加双引号的问题详解

    转自:http://www.2cto.com/database/201504/387184.html 作为oracle的初学者相信大家一定会遇到这个问题,如图: 明明就是navicat可视化创建了表, ...

  8. VueRouter和Vue生命周期(钩子函数)

    一.vue-router路由 1.介绍 vue-router是Vue的路由系统,用于定位资源的,在页面不刷新的情况下切换页面内容.类似于a标签,实际上在页面上展示出来的也是a标签,是锚点.router ...

  9. Linux之文本编辑器Vim

    一.什么是vim vi是一种模式编辑器.vi 是Unix世界里极为普遍的全屏幕文本编辑器,几乎可以说任何一台Unix机器都会提供这套软体,其他的文本编辑器则不一定会存在,但是目前我们使用比较多的是 v ...

  10. C# 中ref与out关键字区别

    ref 关键字通过引用传递的参数的内存地址,而不是值.简单点说就是在方法中对参数的任何改变都会改变调用方的基础参数中.代码举例: class RefExample { static void Meth ...