var arr = ['a','b','c'];
$.each(arr, function(index, obj) {
// 'this' is the object of the current iteration
alert(this);
//This will alert a or b or c in each iteration
});
$(arr).each(function(index, obj) {
// 'obj' is the object of the current iteration
alert(obj);
//This will alert a or b or c in each iteration
});
No comments:
Post a Comment