我正在尝试使用jQuery循环遍历具有相同类名的元素列表,并提取它们的值。
我现在有这个代码...
function calculate() {
// Fix jQuery conflicts
jQuery.noConflict();
jQuery(document).ready(function(){
// Get all items with the calculate className
var items = jQuery('.calculate');
});
}
我正在阅读each()函数,但是在这个例子中如何正确使用它却感到困惑。
jQuery('.calculate').each(function(index,currentElement) ..
- Albert Català