>
> Ok, this does work:
>
> var list = ['foo', 'bar', 'baz'];
> var ul = $('#myul');
>
> list.forEach(function(data) {
>     ul.append($('<li/>')).text(data);
> });
>

Surely that is:

var list = ['foo', 'bar', 'baz'];
var ul = $('#myul');

list.forEach(function(data) {
     ul.append($('<li/>').text(data));
});

(with the text() call applied to the li rather than the ul)?

Although this is probably getting off topic for the jquery dev list...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to