我想開顯示模式彈出時,頁面加載,無需任何點擊自動打開reaveal模式
這裏是有:
<!DOCTYPE html>
<head>
<title>Modal PopUp</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<link type="text/css" rel="stylesheet" href="css/reveal.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script>
<script type="text/javascript" src="js/jquery.reveal.js"></script>
<script language="JavaScript">
$(function() {
$("#myModal").dialog();
});
</script>
</head>
<body>
<!-- #reveal modal popup -->
<div id="myModal" class="reveal-modal">
<h1>Reveal Modal Goodness</h1>
<p>This is a default modal in all its glory, but any of the styles here can easily be changed in the CSS.</p>
<a class="close-reveal-modal">×</a>
</div>
<!-- #reveal modal popup -->
</body>
</html>
我不想使用此觸發器:
<a href="#" data-reveal-id="myModal">Click Me For A Modal</a>
它應該會自動打開。
$( '#myModal')顯示();應該告訴你模態 – DoXicK