我使用此代码生成引导面板使用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'中出现了某些错误。请检查您的浏览器控制台。 –
检查您的浏览器控制台。 –