Hi Guys, I'm getting crazy over this script. It's not working. Can anyone give me a tip how to fix it?
cookies code help needed (html,css,js)
8
Hi Guys,
I'm getting crazy over this script. It's not working. Can anyone give me a tip how to fix it?
my codes are following:
inside the <body> tag in my html:
my css file is following (it's more for styling):
and my "java" is following:
in fact I'm completely new to java so I copied it and inserted it before the </body> tag and obviously it is not working...
can someone help me? I need the message to close when pressing the "ok" button...
I'm getting crazy over this script. It's not working. Can anyone give me a tip how to fix it?
my codes are following:
inside the <body> tag in my html:
HTML Code:
<div class="cookie-message"> <p class="cookie-content">This website uses cookies. By Browsing this website you acconsent to the use of cookies. </p> <p class="cookie-content"><button class="button">OK</button> <a href="http://here-goes-my-cookie-page.com">Read more about cookies</a></p> </div>
Code:
.cookie-message {
width: 100%;
background: #333;
color: #ddd;
padding: 1em 1em .5em;
position: fixed;
left: -5px;
bottom: 2em;
text-align: left;
z-index: 1;
} Code:
<!--Start Cookie Script-->
<script>
$('.cookie-header').click(function() {
$('.cookie-content').slideToggle('fast');
$('.cookie-content button').click(function() {
$('.cookie-content').slideUp('fast');
});
});
</script>
<!--End Cookie Script--> can someone help me? I need the message to close when pressing the "ok" button...
- 2WDHost
- [ 1 ] Thanks
- [1] reply
- wordpress+expert
- [ 1 ] Thanks
- [1] reply
- Arcsn
- 2WDHost
- wordpress+expert
Next Topics on Trending Feed
-
8