jQuery index()

$('#bar').index(); //1,不传递参数,返回这个元素在同辈中的索引位置。
原文地址:https://www.cnblogs.com/mabelstyle/p/3750581.html