Javascript 关闭后重置模式显示

Javascript 关闭后重置模式显示,javascript,php,jquery,reveal.js,jquery-1.7,Javascript,Php,Jquery,Reveal.js,Jquery 1.7,我在template header.php中有一个模态: <div id="modalRv"> <?php echo $_SESSION['test']; ?> <a class='close'>Close</a> </div> 在.js中,我会: ('#modalRv').reveal({ // The item which will be opened with reveal

我在template header.php中有一个模态:

<div id="modalRv">
   <?php echo $_SESSION['test']; ?>
   <a class='close'>Close</a>
</div>
在.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
});
其思想是,模板只加载一次,但每次调用的$\u SESSION['test']值都会更改,但我只得到start的值。我试着做:

$('#modalRv').html("");
但是同样的情况。对不起我的英语。Thx-advanced

您似乎在一些jQuery对象上丢失了$。这可能会对您有所帮助
$('#modalRv').html("");