私は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'で何かがエラーになりました..ブラウザコンソールを確認してください。 –
ブラウザコンソールを確認してください。 –