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).
(使用each:' i
'是数组中的postion, obj
是你正在迭代的DOM对象(也可以通过jQuery包装器$(this)
访问)。)
$('.testimonial').each(function(i, obj) {
//test
});
Check the api reference for more information.
(有关更多信息,请查看api参考 。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…