0
私はプレイとjqueryテンプレートの初心者です。 私がしたいことは、divのクリックでpojoデータをレンダリングすることです。 は、データが読み込ま取得されていないような構文に助けが必要.. 私はこの上でいくつかの助けをworking..Needされていないis..whichをやろうとしています。..jquery templates with play framework
<script id="expense" type="text/x-jquery-tmpl">
{{=name}}
</script>
<script type="text/javascript">
$('#invoicelist').click(function(){
if ($(this).next().is(":hidden")){
$.post('bars.json', function(data){
$.each(data, function(index, item){
// $("#expandeddetails1").show("slow");
//$("#expandeddetails1").clone(true)
// .insertAfter("#expandeddetails1");
$("#employeeTemplate").tmpl(item)
.appendTo('#invoicelist');
});
});
}else{
$(this).next()
.slideUp("slow",function(){
$("#expandeddetails1").detatch()
});
}
return false;
});