我有这个
$.each(data, function (url) {
$("ul").append($("<li class='horizontal'></li>").html(this.title));
});
Run Code Online (Sandbox Code Playgroud)
我想把班级最后添加到最后一个......我该怎么办呢
$.each(data, function(i,v){
$('<li />').html(v.title).appendTo('ul');
});
$('ul li:last').addClass('horizontal');
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
487 次 |
| 最近记录: |