1.each
a. $.each(array,callback);$.each(object,callback)
b.callback 接受两个参数,function(index,value)或function(property,value)
2.inArray
a.$.inArray(value,array,[fromIndex]) fromIndex为查找的起始位置,该方法返回value的位置
b.若不存在,返回-1,类似js中的indexOf
3.trim
a.$.trim(ele.val())
b.$ele.val().replace(/^\s+|\s+$/g,'')同样效果
4.get
a.get([index])
b.get得到的是dom对象,eq(index)得到的是jquery对象
c.若为正数从0索引,若为负数,从-1开始索引
5.index
a.$('li').index() 无参数时,返回第一个li元素相对于同辈元素的位置
b.$('li').index(element) element可为dom对象或jquery对象,返回传入的element在li元素集合的位置
c.$('li').index(selector) 返回匹配的元素在li元素集合的位置,找不到时返回-1