Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
185
rated 0 times [  189] [ 4]  / answers: 1 / hits: 110716  / 15 Years ago, wed, july 8, 2009, 12:00:00

Is there a jQuery way to perform iteration over an object's members, such as in:



    for (var member in obj) {
...
}


I just don't like this for sticking out from amongst my lovely jQuery notation!


More From » jquery

 Answers
32
$.each( { name: John, lang: JS }, function(i, n){
alert( Name: + i + , Value: + n );
});


each


[#99169] Friday, July 3, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lexusg

Total Points: 718
Total Questions: 106
Total Answers: 104

Location: Palestine
Member since Tue, Jul 20, 2021
3 Years ago
;