slideToggle does not work
Hello,
i am working on a new website and i want to use the JQuery-tool slideToggle on one site. I tried a lot but it does not work. Can somebody help me to find my mistake?
That would be very nice.
Many thanks in advance
nannic
- <!DOCTYPE html>
<
head>
<
style>
body {
position: absolute;
width:900px;
margin-left:17%;
padding:0px;
border:3px solid #010000;}
#Container {
position: relative;
background-color: lightgrey;
width:650px;
margin-left:5px;
margin-top:10px;
border: 1px solid black;
border-radius: 5px;}
#Ueberschrift {
width: 620px;
float:left, right, bottom, top;
margin-left:15px;
margin-bottom:5px;
background-color: white;
border-top:1px solid white;
border-left:1px solid white;
border-right:1px solid white;
border-radius: 5px;}
#Text {
display: none;
width: 620px;
float:left, right, bottom, top;
margin-left:15px;
margin-bottom:5px;
background-color: white;
border-left:1px solid white;
border-right:1px solid white;
border-radius: 5px;}
</
style>
<
body>
<
div id = "Container">
Test Test Test Test Test Test Test
<div id = "Ueberschrift"> hier steht die Überschrift </div>
<
div id = "Text"> Hier steht der weitere Text </div>
<
div id = "Ueberschrift"> hier steht die Überschrift </div>
<
div id = "Text"> Hier steht der weitere Text </div>
<
div id = "Ueberschrift"> hier steht die Überschrift </div>
<
div id = "Text"> Hier steht der weitere Text </div>
</
div>
<
script type="text/javascript" src="script.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#Ueberschrift").click(function(){
$(this).next("#Text").slideToggle("fast")
});
});
</script>
</body>