Using jQuery.each() to iterate through an array of objects.
I'm trying to interate through an array of objects. Here's my code:
- $('form').submit(function(){
- var serializeArr = $(this).serializeArray();
- jQuery.each(serializeArr, function(i, obj){
- alert('Hi');
- }
- });
However, this just fails. It seems like its getting stuck on the serializeArray aka an array of objects. I've gone the for loop route and it worked fine up until I started doing some ajax stuff...the variable binding behavior was all over the place and unusable. Any suggestions would be great!