jQuery1.3.2源码学习8:index 函数
发布时间:2018-09-20 04:32:08 所属栏目:传媒 来源:站长网
导读:// 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。 出处:博客园 (编辑:PHP编程网 - 黄冈站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |