Response title
This is preview!
var arr = ["Apple",
"Apple2", "Orange", "Pineapple"];
var $el = '<ul>';
$.each(arr, function(i, v) {
$el += '<li id = "header">' + v.slice(0, 1) + '</li>';
$el += '<li id = "list" >' + v + '</li>';
});
$el += '<ul>';
$('body').append($el);
© 2013 jQuery Foundation
Sponsored by and others.