2017-02-27 59 views
0
$.each(category, function (index, value) { 
var addnew = '<div class="about">'; 
    addnew += '<div class="profile-title">'; 
    addnew += '<span>'; 
    addnew += '</span>'; 
    addnew += '</div>'; 
    addnew += '</div>'; 
}); 

我只是想得到的價值,並把它放在SPAN標籤 如何做到這一點?jquery。每個獲得值

+0

爲什麼你把你的jQuery傾斜跡象裏面你應該如下使用我的代碼? –

+0

對不起錯字 –

+0

什麼是你的問題@DaveManuel? –

回答

2

如果你有類別陣列category可變::

$.each(category, function (index, value) { 
    var addnew = '<div class="about">'; 
    addnew += '<div class="profile-title">'; 
    addnew += '<span>' + value + '</span>'; 
    addnew += '</div>'; 
    addnew += '</div>'; 
}); 
+0

我會檢查我的數組是否正常工作 –

+0

@DaveManuel是的,請檢查。 –

+0

我有probkwn un我的數組 –