Witam chciałem dodać do strony taką bęlkę na samym dole jak jest tutaj:
http://ideas2action.pl/2013/03/14/pliki-co...internetowych/#

Informuje ona że strona posiada własną politykę prywatności dot. cookies


Jak sprawdziłem źródło to za wyświetlanie tego kodu znalazłem te linijki:
  1. <!-- COOKIES -->
  2. <script type="text/javascript" src="http://static.divante.pl/cookies/divante.cookies.min.js"></script>
  3. <script>window.jQuery.cookie || document.write('<script src="http://static.divante.pl/cookies/jquery.cookie.min.js"><\/script>')</script>
  4. <script type="text/javascript">
  5. $.divanteCookies.render({
  6. privacyPolicy : true,
  7. cookiesPageURL : 'http://regulaminy.grupadivante.pl/SWRlYWN0bytTcC4reitvLm8u/dWwuK0tvJUM1JTlCY2l1c3praSsxNCUyQys1MC0wMzgrV3JvYyVDNSU4MmF3/ideas2action.pl/regulamin_cookies.html'
  8. });
  9. </script>
  10. <!-- /end COOKIES -->


Skopiowałem ten kod na swoją stronę. Nie zmieniałem linków ponieważ chciałem zobaczyć czy zadziała. W swoim pliku css dodałem taki fragment:

  1. #cookiesBar {
  2. -moz-font-feature-settings: normal;
  3. -moz-font-language-override: normal;
  4. -x-system-font: none;
  5. background-attachment: scroll;
  6. background-clip: border-box;
  7. background-color: #EBEBEB;
  8. background-image: linear-gradient(#FFFFFF, #EBEBEB);
  9. background-origin: padding-box;
  10. background-position: 0 0;
  11. background-repeat: repeat;
  12. background-size: auto auto;
  13. border-bottom-color: #D7D7D7;
  14. border-bottom-style: solid;
  15. border-bottom-width: 1px;
  16. border-top-color: #D7D7D7;
  17. border-top-style: solid;
  18. border-top-width: 1px;
  19. bottom: 0;
  20. color: #414141;
  21. font-family: Arial,sans-serif;
  22. font-size: 11px;
  23. font-size-adjust: none;
  24. font-stretch: normal;
  25. font-style: normal;
  26. font-variant: normal;
  27. font-weight: 400;
  28. left: 0;
  29. line-height: 1em;
  30. padding-bottom: 10px;
  31. padding-left: 0;
  32. padding-right: 0;
  33. padding-top: 10px;
  34. position: fixed;
  35. width: 100%;
  36. z-index: 9999;
  37. }
  38. #cookiesBar a {
  39. border-bottom-color: #AEAEAE;
  40. border-bottom-style: dotted;
  41. border-bottom-width: 1px;
  42. color: #414141;
  43. }
  44. #cookiesBar a:hover {
  45. color: #AEAEAE;
  46. }
  47. #cookiesBar p {
  48. line-height: 1;
  49. margin-bottom: 2px;
  50. margin-left: 0;
  51. margin-right: 0;
  52. margin-top: 2px;
  53. }
  54. #cookiesBarWrap {
  55. margin-bottom: 0;
  56. margin-left: auto;
  57. margin-right: auto;
  58. margin-top: 0;
  59. position: relative;
  60. width: 840px;
  61. }
  62. #cookiesBarClose {
  63. background-attachment: scroll;
  64. background-clip: border-box;
  65. background-color: transparent;
  66. background-image: url("http://......../images/btn-close.png");
  67. background-origin: padding-box;
  68. background-position: 0 0;
  69. background-repeat: no-repeat;
  70. background-size: auto auto;
  71. display: block;
  72. height: 19px;
  73. position: absolute;
  74. right: 0;
  75. text-indent: -999em;
  76. top: 2px;
  77. width: 20px;
  78. }
  79. a#cookiesBarClose {
  80. -moz-border-bottom-colors: none;
  81. -moz-border-left-colors: none;
  82. -moz-border-right-colors: none;
  83. -moz-border-top-colors: none;
  84. border-bottom-color: -moz-use-text-color;
  85. border-bottom-style: none;
  86. border-bottom-width: 0;
  87. border-image-outset: 0 0 0 0;
  88. border-image-repeat: stretch stretch;
  89. border-image-slice: 100% 100% 100% 100%;
  90. border-image-source: none;
  91. border-image-width: 1 1 1 1;
  92. border-left-color-ltr-source: physical;
  93. border-left-color-rtl-source: physical;
  94. border-left-color-value: -moz-use-text-color;
  95. border-left-style-ltr-source: physical;
  96. border-left-style-rtl-source: physical;
  97. border-left-style-value: none;
  98. border-left-width-ltr-source: physical;
  99. border-left-width-rtl-source: physical;
  100. border-left-width-value: 0;
  101. border-right-color-ltr-source: physical;
  102. border-right-color-rtl-source: physical;
  103. border-right-color-value: -moz-use-text-color;
  104. border-right-style-ltr-source: physical;
  105. border-right-style-rtl-source: physical;
  106. border-right-style-value: none;
  107. border-right-width-ltr-source: physical;
  108. border-right-width-rtl-source: physical;
  109. border-right-width-value: 0;
  110. border-top-color: -moz-use-text-color;
  111. border-top-style: none;
  112. border-top-width: 0;
  113. }
  114. #cookiesBarClose:hover {
  115. background-position: -20px 0;
  116. }
  117.  


Niestety wyświetlanie nie działa. Czy ktoś może mi wytłumaczyć dlaczego nie działa takie wyświetlanie na mojej stronie skoro skopiowany kod jest taki sam ?

był błąd zamiast $.divanteCookies.render na jQuery.divanteCookies.render

i druga sprawa to trzeba dodać bibliotekę jquery czyli
<script async type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js?ver=1.6.2'></script>