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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -