Post by witherbones on Jun 16, 2013 15:52:37 GMT -8
Hello!
I'm trying to learn coding, and am now learning some basic javascript and JQuery. I have a very simple code that, when using my generator, works fine, but when placed into my headers for my site, do not work correctly.
My Site:
abelastation.boards.net/index.cgi
CSS:
HTML:
JavaScript:
Now, basically what I am trying to get this code to do at this point is when you click on "Slide Up/Down", the div ".panel" will slide down and reveal it's secrets. However, by visiting my site and testing this out, you can see that this, for whatever reason, does not work.
Now, I am not used to using JQuery etc. outside of the generator, so there could be half a million reasons why this doesn't work outside of it. I was wondering if you lovely gentleman and ladies could help me discover why. All help is greatly appreciated.
Thank you,
WitherBones
I'm trying to learn coding, and am now learning some basic javascript and JQuery. I have a very simple code that, when using my generator, works fine, but when placed into my headers for my site, do not work correctly.
My Site:
abelastation.boards.net/index.cgi
CSS:
a:hover{
-webkit-box-shadow: 0 0 8px #FFD700;
-moz-box-shadow: 0 0 8px #FFD700;
box-shadow: 0 0 8px #FFD700;
cursor:pointer;
}
.panel {
background: #ffffbd;
background-size:90% 90%;
height:300px;
display:none;
font-family:garamond,times-new-roman,serif;
}
.panel p{
text-align:center;
}
.slide {
margin:0;
padding:0;
border-top:solid 2px #cc0000;
}
.pull-me {
display:block;
position:relative;
right:-25px;
width:150px;
height:20px;
font-family:arial,sans-serif;
font-size:14px;
color:#ffffff;
background:#cc0000;
text-decoration:none;
-moz-border-bottom-left-radius:5px;
-moz-border-bottom-right-radius:5px;
border-bottom-left-radius:5px;
border-bottom-right-radius:5px;
}
.pull-me p {
text-align:center;
}
HTML:
<div class="panel">
<br />
<br />
<p>Now you see me!</p>
</div>
<p class="slide"><a href="#" class="pull-me">Slide Up/Down</a></p>
JavaScript:
<script type="text/javascript">
$(document).ready(function(){
$('.pull-me').click(function(){
$('.panel').slideToggle('slow');
});
});
</script>
Now, basically what I am trying to get this code to do at this point is when you click on "Slide Up/Down", the div ".panel" will slide down and reveal it's secrets. However, by visiting my site and testing this out, you can see that this, for whatever reason, does not work.
Now, I am not used to using JQuery etc. outside of the generator, so there could be half a million reasons why this doesn't work outside of it. I was wondering if you lovely gentleman and ladies could help me discover why. All help is greatly appreciated.
Thank you,
WitherBones