
<div id="<?php echo $dhtrigger;?>" class="<?php  echo  $cssname?>">
  <dl class="accord">
<?php

foreach($result['data'] as $k=>$v){
          // pre($v);
        $title = $v['title'];  

?>
  <dt><?php echo $title;?></dt>
    <dd style="display:none">
        <?php
            textformat($v,$cssname);
          ?>
    </dd>
<?php
 }
  ?>
    </dl>
</div>


<script>
$(function(){
      //$('#<?php echo $dhtrigger?> .accord dd').hide();
       $('#<?php echo $dhtrigger?> .accord').on('click', 'dt', function() {

           // $(this).next().slideToggle(200);
           var dtdisplay = $(this).next().css('display');
           //alert(dtdisplay);

           if($(this).next().css('display')=='block')  $(this).next().hide();
            else  {
                 $('#<?php echo $dhtrigger?> .accord dd').hide();
                 $(this).next().show();
            }
    });

});
</script>
