jQuery1.3.2源码学习8:index 函数
发布时间:2018-11-02 06:55:19 所属栏目:传媒 来源:站长网
导读:// Determine the position of an element within // the matched set of elements 160 index: function( elem ) { // Locate the position of the desired element return jQuery .inArray( // If it receives a jQuery object, the first element is used
// Determine the position of an element within // the matched set of elements 160 index: function( elem ) { // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem && elem.jquery ? elem[0] : elem , this ); }, 160 行的 index 函数用来返回元素在查询结果中的下标。下标从 0 开始,如果没有找到匹配的元素,那么返回 -1。 出处:博客园 (编辑:西双版纳站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 三大运营商同台为2019开源基础设施峰会做了生动的注脚
- Palo Alto Networks向Prisma Cloud平台整合多项收购成果
- 普华永道:数字化转型可能有回报,但在某些领域来之不易
- 求职战"疫" 网易云信携手滨江区人力社保局实现「无接触」招
- IBM Power Systems已通过SAP HANA企业云认证,成为大型SAP
- 期待已久:谷歌正式发布Google Cloud VMware Engine
- VMware支持客户构建多云未来
- Parallels Desktop 16 for Mac全新发布,旨在打造在Mac上运
- 谷歌利用53量子比特Sycamore芯片实现量子霸权
- 互联网卖菜,远远不是一个自提柜的距离