折りたたみパネルにxmlコンテンツから動的にjPanelを使用しようとしていますが、動的に作成されたパネルは表示されません。これはあまりにもjqueryでJPanelを動的に作成する方法は?
私を助け:
<div id="detailTable" style="width:100%;">
</div>
<!--Creating panels (Same thing if i create manually it is created, see the image)-->
<div title="General Properties" class="class">
ad
</div>
<div title="Other Properties" class="class">
ad1
</div>
のjQuery
$('.class').jPanel({
'effect' : 'fade',
'speed' : 'slow',
'easing' : 'swing'
});
//when the user clicks on `Server` (left hand side) the below code is triggered
$('#detailTable').empty();
$('<div>')
.html('<div class="titleBlue">Configuration>'+productname+'>Server</div>'+
'<div title="General Properties" class="class">'+ //Creating panels dynamically
'<table style="border:#2F5882 1px solid;width:100%;" cellspacing="1" cellpadding="1">'+
'<tbody>'+
'<tr>'+
'<th style="width:22%" align="left">Version</th>'+
'<td style="align="left">'+infa9_pm_version+'</td>'+
'</tr>'+
'</tbody>'+
'</table>'+
'</div>'+
'<div title="Other Properties" class="class">'+
'<table style="border:#2F5882 1px solid;width:100%;" cellspacing="1" cellpadding="1">'+
'<tbody>'+
'<tr>'+
'<th style="width:22%" align="left">Home</th>'+
'<td style="align="left">test</td>'+
'</tr>'+
'</tbody>'+
'</table>'+
'</div>')
.appendTo('#detailTable');
更新に
マイ容器の下の画像を参照してください。
$('#detailTable').empty();
$('<div>')
.html('')
.appendTo('#detailTable').delay(10).queue(function(){
$('.class').jPanel({
'effect' : 'fade',
'speed' : 'slow',
'easing' : 'swing'
});
});
回答ありがとうございますが、divをクリックしたときに表示されるパネルは、作成直後にどのように表示されるのですか? – abi1964
クリックをプログラムでトリガできます。更新された答え。 – Jayendra
ありがとうございます。 '.delay(10).queue'はまた私に役立ちました..私の更新された質問をご覧ください – abi1964