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. Spring Boot (15) pom.xml设置

    继承spring-boot-parent 要成为一个spring boot项目,首先就必须在pom.xml中继承spring-boot-starter-parent,同时制定其版本 <paren ...

  2. CSS中的五大字体家族(cursive 手写字体族更吸引我)

    这是CSS中的五大字体家族. serifserif 中文翻译为“衬线字体族”.serif 具有末端加粗.扩张或尖细末端,或以实际的衬线结尾的一类字体.可以看出 serif 总是在文字末端做文章,这样做 ...

  3. Java多线程-synchronized关键字

    进程:是一个正在执行中的程序.每一个进程执行都有一个执行顺序.该顺序是一个执行路径,或者叫一个控制单元. 线程:就是进程中的一个独立的控制单元.线程在控制着进程的执行. 一个进程中至少有一个线程 Ja ...

  4. GrepWin:Win7下的文本替换工具

    工作环境退回到Win7之后,内容查找功能非常不给力,推荐一个文本内容查找工具grepWin. Win7下的文本查找/替换工具: grepWin

  5. 【技术累积】【点】【编程】【13】XX式编程

    (原)函数式编程 核心概念 函数式一等公民(输入输出啥的都可以是函数): 纯函数,固定输入带来固定输出: 阅读性良好,无并发问题,但效率偏低: 大历史背景 旨在描述问题如何计算: 有两位巨擘对问题的可 ...

  6. C# 获得剪贴板内容和 richTextBox部分文本设置颜色

    try { MemoryStream vMemoryStream = iData.GetData("Html Format") as MemoryStream; if (vMemo ...

  7. PAT_A1113#Integer Set Partition

    Source: PAT A1113 Integer Set Partition (25 分) Description: Given a set of N (>) positive integer ...

  8. 启动模拟器的qq

    #coding = utf-8from appium import webdriver '''1.手机类型2.版本3.手机的唯一标识 deviceName4.app 包名appPackage5.app ...

  9. Hadoop 使用小命令(2)

    一.查看一堆文件共有多少行 查看file1/file2目录下所有文件总共多少行 hadoop fs -text file1/file2/* | wc -l 二.正则表达式 hadoop fs -tex ...

  10. [Ynoi2015]盼君勿忘

    题目大意: 给定一个序列,每次查询一个区间\([l,r]\)中所有子序列分别去重后的和\(\bmod p\)(每次询问模数不同). 解题思路: 在太阳西斜的这个世界里,置身天上之森.等这场战争结束之后 ...