looping through an array in jQuery -


i'm trying create array of textarea values , loop through them.

here jsfiddle trying work in:

http://jsfiddle.net/kxkhz/1/

when run it, nothing happens.

any idea i'm doing wrong?

var textarray = []; $('[class=objectives]').each(function (i) {      textarray.push($(this).val()); });  (var = 0; < textarray.length; i++) {      console.log(textarray[i].value); } 

there no value property in each element, can do:

for (var = 0; < textarray.length; i++) {      console.log(textarray[i]); } 

working demo - note: jquery wasn't included


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -