Witam wszystkich

Zaczne od tego iz naprawde robie początki w jquery , ale mam potrzebe zrobienia takiej wiadomości gdy użytkownik zamyka stronę , skrypt pochodzi z tej strony :

http://www.bitrepository.com/exit-modal-box.html


Wszystko fajnie tylko problem jest w tym iż zawsze jak ktoś najeżdza na zamkniecie strony , lub chce cofnąć pokazuje mu się to , a ja chciałbym nie denerwować użytkownika tylko np pokazać mu to raz (zapis do cookie) i spokoj np na 7 dni

poczytałem troszke o pluginie do jquery o cookie z tej strony :
https://github.com/carhartl/jquery-cookie

wynik z html:

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5.  
  6. <title>Exit PopUp</title>
  7.  
  8. <link type='text/css' href='basic.css' rel='stylesheet' media='screen' />
  9.  
  10. <script src="jquery.cookie.js"></script>
  11. <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
  12. <script type="text/javascript" src="jquery.simplemodal.js"></script>
  13.  
  14. <script type="text/javascript" src="init.js"></script>
  15.  
  16. <script type="text/javascript" >
  17. $.cookie('myCookie2', 'myValue2', { expires: 7, path: '/', domain: 'example.com', secure: true });
  18.  
  19.  
  20. </script>
  21.  
  22. <style type="text/css">
  23. <!--
  24. .notice {
  25. background-color: #f2faf2;
  26. border: 1px solid #cdcdcd;
  27.  
  28. padding: 5px;
  29. margin: 5px;
  30. }
  31. -->
  32. </head>
  33.  
  34.  
  35.  
  36.  
  37. hhgg
  38.  
  39.  
  40.  
  41.  
  42. <div style="display: none; padding: 10px;" id="exit_content">
  43. <h1>Goodbye visitor!</h1><h3>Thanks for visiting us!</h3><br />Aenean cursus vehicula augue. Pellentesque tincidunt. Donec auctor, justo quis commodo iaculis, eros libero suscipit ipsum, et lobortis mauris erat ac arcu. Praesent dolor libero, porta id, feugiat vitae, porttitor pharetra, elit. Quisque ullamcorper, elit vitae rhoncus rhoncus, massa erat porttitor felis, sit amet viverra diam purus quis tellus. Ut sed massa sed nibh mollis aliquam. Nullam rutrum. Sed a risus. Donec ligula diam, auctor tempus, convallis ut, ultricies eget, massa. Duis rutrum, diam id gravida consectetur, justo augue pellentesque velit, sit amet scelerisque nunc erat vel sapien. Proin ullamcorper. Vestibulum hendrerit pellentesque metus. Mauris tempor nunc at sapien.
  44. </div>
  45.  
  46. </body>
  47.  
  48. </html>



niestety pewnie robie jakiś błąd i proszę o pomoc , ewentualnie jeżeli znacie inne lepsze wyjście na zrobienie takiego czegos prosiłbym też o pomysły ewentualne jakieś rozwiązania

pozdrawiam

ps. skrypt niestety musi tak działać , taki mam problem i niestety musi pokazywac sie takie cos na zakonczenie