我使用此代碼生成引導面板使用JSON
,它的工作正常。但現在我需要在此面板後顯示頁腳。但是在這個函數之後頁腳不會被加載。這個jQuery函數不僅僅是頁腳,其他HTML內容也不會顯示。爲什麼以及如何解決它? 頁腳沒有顯示Jquery函數後
var valMS = [
{
"Subject": "Test",
"Message": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
"Date": "12-03-17"
},
{
"Subject": "Test",
"Message": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
"Date": "12-03-17"
},
{
"Subject": "Test",
"Message": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
"Date": "12-03-17"
},
{
"Subject": "Test",
"Message": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
"Date": "12-03-17"
}
];
$(document).ready(function() {
html = '<div class="container" >';
// var flag = 0;
$.each(valMS, function(index, v){
html += '<div id="events" class="container"><div class="row">';
html += '<div class="panel panel-primary" style="width: 20%;" >';
html += '<div class="panel-heading">'+v["Subject"]+'</div>';
html += '<div class="panel-body">'+v["Message"]+'</div>';
html += '<div class="panel-footer">'+v["Date"]+'</div>';
html += '</div>';
html += '</div></div>';
});
$('body').append(html);
//$(".container").after($("<p>Test</p>"));
});
</script>
什麼頁腳?你所顯示的是javascript。我們不知道頁面中有什麼或者用什麼css。請參閱[mcve] – charlietfl
您的'js'中出現了某些錯誤。請檢查您的瀏覽器控制檯。 –
檢查您的瀏覽器控制檯。 –