var list = []; $('div[id="list"]').find('a').each(function (index, element) { list.push($(element).text()); });