text

http://api.jquery.com/text/

Get the combined text contents of each element in the set of matched elements, including their descendants后裔, or set the text contents of the matched elements.

html

http://api.jquery.com/html/

Get the HTML contents of the first element in the set of matched elements or set the HTML contents of every matched element.

val

http://api.jquery.com/val/

Get the current value of the first element in the set of matched elements or set the value of every matched element.

each

https://api.jquery.com/each/

.prop()

http://api.jquery.com/prop/

Get the value of a property for the first element in the set of matched elements or set one or more properties for every matched element.

.parent()

https://api.jquery.com/parent/

Get the parent of each element in the current set of matched elements, optionally filtered by a selector.

.next()

https://api.jquery.com/next/

Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.

.eq()

https://api.jquery.com/eq/

Reduce the set of matched elements to the one at the specified index.

.on()

http://api.jquery.com/on/

Attach an event handler function for one or more events to the selected elements.

http://live.datatables.net/depawowa/1/edit

jQuery.data()

https://api.jquery.com/jquery.data/

Store arbitrary data associated with the specified element and/or return the value that was set.

.toggleClass()

http://api.jquery.com/toggleclass/

Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument.

使用场景http://live.datatables.net/kuwaduta/1/edit

jQuery.each

http://api.jquery.com/jquery.each/

$(this)

https://stackoverflow.com/questions/4735342/jquery-to-loop-through-elements-with-the-same-class

Use each: 'i' is the postion in the array, obj is the DOM object that you are iterating (can be accessed through the jQuery wrapper $(this) as well).

$('.testimonial').each(function(i, obj) {
//test
});

Check the api reference for more information.

JQuery常用的api[最好是系统地学习一下《锋利的JQuery》]的更多相关文章

  1. jQuery常用的API

    1.jQuery给标签添加子元素(父子关系) jQuery对象.append("子"); 将div标签插入到ul标签之后 $("ul").append($('d ...

  2. jquery 常用api 小结2

    *一)jQuery常用方法API实战 (1)DOM简述与分类 A)DOM是一种标准,它独立于平台,语言,浏览器. B)如果项目中,你完全按照DOM标准写代码,你就能在各大主流的浏览器中操作标准控件. ...

  3. JQuery常用API 核心 效果 JQueryHTML 遍历 Event事件

    JQuery 常用API 参考资料:JQuery 官网   jQuery API 中文文档 核心 jQuery 对象 jQuery() 返回匹配的元素集合,无论是通过在DOM的基础上传递的参数还是创建 ...

  4. jquery中最常用的API有哪些

    jquery中最常用的API有哪些 一.总结 一句话总结:取html的方法,class相关的方法,val相关的方法,data相关的方法,attr相关的方法 1.jQuery Object Access ...

  5. jQuery常用API之jQuery选择器

    3.jQuery常用API 3.1 jQuery选择器 3.1.1 jQuery基础选择器 原生JS获取元素的方式很多.很杂,而且兼容性情况不一致,因此jQuery给我做了封装,是获取元素统一了标准 ...

  6. Jquery学习总结(1)——Jquery常用代码片段汇总

    1. 禁止右键点击 ? 1 2 3 4 5 $(document).ready(function(){     $(document).bind("contextmenu",fun ...

  7. 锋利的jQuery学习总结

    通过对<锋利的jQuery>(第二版)一书的学习,发现此书讲解通俗易懂,是学习jQuery的一本很好的指导书,特作如下总结.此书主要讲解了jQuery的常用操作,包括认识jQuery,jQ ...

  8. jQuery常用技巧-使用的总结

    1.关于页面元素的引用 通过jquery的$()引用元素包括通过id.class.元素名以及元素的层级关系及dom或者xpath条件等方法,且返回的对象为jquery对象(集合对象),不能直接调用do ...

  9. 锋利的jQuery(第二版)学习总结

    通过对<锋利的jQuery>(第二版)一书的学习,发现此书讲解通俗易懂,是学习jQuery的一本很好的指导书,特作如下总结. 此书主要讲解了jQuery的常用操作,包括认识jQuery,j ...

随机推荐

  1. SQLServer外部数据导入--Excel版

    例如要在test表里插入多行数据 假设字段有: ID.Name 首先要有需要导入的数据的Excel A1 对应ID B1 对应Name 选中Excel第一行的空白处,比如C1,在工具栏的函数文本框里输 ...

  2. three.js 流程图

    用Axure做了个模型图:          第一步: Scene --模型.灯光.特效 第二步: Camera --视角 第三步: Renderer -- 渲染输出 第四步: render --渲染 ...

  3. Visual Studio UI Automation 学习(二)

    今天恰好有时间,继续学习了一下UI Automation的知识.看了两篇博客,对UI Automation有了进一步的了解. https://blog.csdn.net/qq_37546891/art ...

  4. VS2013配置编译Caffe-Win10_X64

    原文链接:http://blog.csdn.net/joshua_1988/article/details/45036993 有少量修改................ 2014年4月的时候自己在公司 ...

  5. JSP状态管理_1_Cookie

    http协议的无状态性:当浏览器发送请求飞服务器时,服务器相应客户端请求:但当同一个浏览器再次发送请求给浏览器时,服务器并不知道它就是刚才那个客户端. 保存用户状态的两大机制:Session,Cook ...

  6. Java 8 函数接口详细教程

    ay = new byte[array.length]; for (int i = 0; i < array.length; i++) { transformedArray[i] = funct ...

  7. PAT_A1110#Complete Binary Tree

    Source: PAT A1110 Complete Binary Tree (25 分) Description: Given a tree, you are supposed to tell if ...

  8. loadrunner报错总结

    1.报错   没有缓存空间可用   TCP超时释放时间?是解决刚才那个报错的? 解决方法如下  修改TcpTimedWaitDelay值为1和MaxUserPort值为65534.最后,重启!  完美 ...

  9. swift-UITextfield控件的基本属性设置

    //1.初始化UITextField let userName=UITextField(frame: CGRectMake(0, 100, 100, 100)); //2.将文本框userName添加 ...

  10. python 用PIL Matplotlib处理图像的基本操作

    在 python 中除了用 opencv,也可以用 matplotlib 和 PIL 这两个库操作图片.本人偏爱 matpoltlib,因为它的语法更像 matlab. 一.matplotlib 1. ...