vendredi 20 novembre 2015

Extract text from a list of Html elemnts using jquery

I have an issue when trying to get the text out of a list of elements in jquery.

I have a list of elements in a varible.. What i want is to extract the text from each elements and insert it into a list of strings with comma seperation.

my code:

var names = $('input.select:checked').closest('tr').find('.citizen-name');
for (var i = 0; i < names.length; i++) {
                ???;
            }

how can i do this?

thanks for the help!

Aucun commentaire:

Enregistrer un commentaire