日期:2014-05-16 浏览次数:20450 次
<div id="divAcc"></div>
<script>
var data = ['accordion1', 'accordion2', 'accordion3', 'accordion4'];//返回的数据
for (var i = 0; i < data.length; i++) {
$('#divAcc').append('<div title="' + data[i] + '">' + data[i] + '</div>');
}
$('#divAcc').accordion({ border: false, fit: true })
</script>