Hi,
I am trying to popup an alert once a day, but it does not work, long time I did not touch jquery, I feel I am lost, thanks, your help is appreciated.
Here is what I did :
- <html>
- <head>
- <link rel="stylesheet" href="reveal.css">
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script>
- <script type="text/javascript" src="jquery.reveal.js"></script>
-
- <script type="text/javascript">
- $(document).ready(function() {
- if ( localStorage.getItem('seen') != (new Date()).getDate()) {
- setTimeout(showpanel, 4000);
- }
- $("div").click(function() {
- alert("Wel-Come to the Learn jQuery..!");
- });
- function showpanel() {
- $('.reveal-modal').reveal({
- animation: 'fade',
- animationspeed: 800
- });
- localStorage.setItem('seen', (new Date()).getDate());
- }
-
-
- });
- </script>
- </head>
- <body>
- <div id="ex1">
- Click here to open Dialogue Box.
- </div>
- <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>
- </body>
- </html>
- Thanks,