Hi,
ich habe die funktion wie bei der mootools doc nachgebaut aber bei mir hat es nicht den gewünschten effekt, dass die content divs erst erscheinen, wenn man klickt, was mache ich denn falsch?
Hier der code:
LG & danke
ich habe die funktion wie bei der mootools doc nachgebaut aber bei mir hat es nicht den gewünschten effekt, dass die content divs erst erscheinen, wenn man klickt, was mache ich denn falsch?
Hier der code:
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<script type='text/javascript' src='http://fiddle.jshell.net/js/lib/mootools-core-1.4.5-compat.js'></script>
<script type='text/javascript' src='http://fiddle.jshell.net/js/lib/mootools-more-1.4.0.1-compat.js'></script>
<style type='text/css'>
.wrapper{
max-width:613px;
float:left;
position:relative;
}
.new {
border: solid 1px #ddd;
padding: 5px;
float:left;
max-width:660;
min-width:320px;
}
.item{
width:120px;
padding:10px;
display:block;
background-color:#CCC;
float:left;
margin:5px;
}
.content{
padding:10px;
height:80px;
}
.item:hover > .content{
}
.full{
position:absolute;
width:100%;
display:block;
height:100px;
background-color:#666;
left:0px;
}
</style>
<script type='text/javascript'>
window.addEvent('domready', function() {
var status = {
'true': 'close',
'false': 'open'
};
status = true;
var myVerticalSlide = new Fx.Slide('content');
$('item').addEvent('click', function(event){
event.stop();
myVerticalSlide.toggle();
});
});
</script>
</head>
<body>
<div class="wrapper">
<div class="test">
<div id="item" class="item">Test1
<div id="content" class="content">
<div class="full">
<p>Content1</p>
</div>
</div>
</div>
<div class="item">Test2
<div class="content">
<div class="full">
<p>Content2</p>
</div>
</div></div>
<div class="item">Test3
<div class="content">
<div class="full">
<p>Content3</p>
</div>
</div></div>
<div class="item">Test4
<div class="content">
<div class="full">
<p>Content4</p>
</div>
</div></div>
<div class="item">Test5
<div class="content">
<div class="full">
<p>Content5</p>
</div>
</div></div>
<div class="item">Test6
<div class="content">
<div class="full">
<p>Content6</p>
</div>
</div></div>
<div class="item">Test7
<div class="content">
<div class="full">
<p>Content7</p>
</div>
</div></div>
<div class="item">Test8
<div class="content">
<div class="full">
<p>Content8</p>
</div>
</div></div>
<div class="item">Test9
<div class="content">
<div class="full">
<p>Content9</p>
</div>
</div></div>
<div class="item">Test10
<div class="content">
<div class="full">
<p>Content10</p>
</div>
</div></div>
<div class="item">Test11
<div class="content">
<div class="full">
<p>Content11</p>
</div>
</div></div>
</div>
</div>
</body>
</html>
LG & danke