0
javascript에서 아코디언을 만들었습니다. 아코디언 헤더 (내 머리글)와 아코디언 내용 정보 (테이블)를 가운데에 정렬하고 싶습니다. 그러나, 나는 그것을 알아낼 수 없었다. 콘텐츠와 헤더 정렬
$.each(myData.offsetFormations, function(i,aut) {
headerList = '<h3><ul><li contenteditable="true">'+
'<text class="formationName">'+ aut.FormationName + '</text>'+
' | ' +
'<text class="bitSize">'+this.BitSize.toFixed(2) + '</text>'+
' | ' +
'<text class="bitType">'+this.BitType + '</text>'+
'</li></ul></h3>';
wellNameList = '<div><table>';
$.each(myData.wellList, function(k,mano){
if(aut.AssociatedwellList.some(function(w) { return w.WellName === mano.WellName; }))
{
wellNameList += '<td><div>'+ mano.WellName+'</div></td>';
}
else
{
wellNameList += '<td style="color:gray;" ><div>'+ mano.WellName+'</div></td>';
}
});
wellNameList += '</table></div>';
headerList += '<div>'+wellNameList +'</div>';
$(headerList).appendTo('#accordion');
});
jsfiddle 코드 : 아코디언 내용에 http://jsfiddle.net/xg7cr0g4/31/
카시야스. 헤더 정렬에 대한 지원도 추가했습니다. – dewd