Blogger API を使用しているページでアコーディオンを作成する際に問題があります。Blogger API を使用してフェッチされたhttp://www.winworldgk.tkの Blogger 投稿のリストにアコーディオン形式を適用する必要があります。問題は、すべての投稿コンテンツとタイトルを表示できますが、必要なアコーディオン スタイルではなく一般的なスタイルです。誰も助けてくれませんか。コードは次のとおりです...
$(document).ready(function() {
// Make a JSONP request for the Posts on the Blogger Buzz blog
$.ajax({
url:"https://www.googleapis.com/blogger/v3/blogs/578441859855451483/posts?labels=EnglishTest&maxResults=5&key=mykey",
dataType: "jsonp",success: function(data, textStatus, jqXHR) {
var items = [];
// Construct a chunk of HTML for each post
// containing the Post title, content, and a
// link to the post author.
$.each(data.items, function(index, value) {
$('<h3><a href="#">'+value.title+'</a></h3><div>'+value.content+'</div>').appendTo("#accId");
}
});$("#accId").addClass("accordion");
}
});
});
<html>
<body>
<div id="accId"></div>
</body>
</html>