0

我在模板 header.php 中有一个模式:

<div id="modalRv">
   <?php echo $_SESSION['test']; ?>
   <a class='close'>Close</a>
</div>

此 div 仅加载一次。在这个模板中,我这样做:

('a.close').on('click', function() {
    $('#modalRv').trigger('reveal:close');
});

在 .js 我做:

('#modalRv').reveal({              //  The  item  which  will  be  opened  with  reveal
    animation: 'fade',             //  fade,  fadeAndPop,  none
    animationspeed: 600,           //  how  fast  animtions  are
    closeonbackgroundclick: true,  //  if  you  click  background  will  modal  close?
    dismissmodalclass:  'close'    //  the  class  of  a  button  or  element  that  will  close  an  open  modal
});

这个想法是模板只加载一次,但$_SESSION['test']每次调用的值都会改变,但我只得到 start 的值。我试着做:

$('#modalRv').html("");

但同样的情况。对不起我的英语不好。提前谢谢

4

0 回答 0