Slide toggle , how to do this better?
Hello, I am working with jQuery for the first time and I am trying to create something relatively simple. Its displayed here
http://www.octografx.com/deoudeplank/producten.html
The .html code is as follows:
-
<div class="prod">
<div class="prod_title">
<h1>Vloer Titel</h1>
</div><!-- end prod_title -->
<a href="#" title="calc">
<img src="images/prod1.jpg" alt="prod1" border="0" />
</a>
<div class="prod_desc">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in.
</p>
</div><!-- end prod_desc -->
</div><!-- end prod -->
The css for styling this is:
-
.oude_plank .prod {
width:100px;
float:left;
margin:5px 0 0 10px;
background:#221e1f;
display:block;
border:none;
position:relative;
}
.oude_plank .prod_title {
padding:5px;
}
.oude_plank .prod h1 {
color:#FFFFFF;
font-size:10px;
border:none;
}
.oude_plank .prod p {
color:#000000;
}
.oude_plank .prod_desc {
top:120px;
left:15px;
width:200px;
background:#fcd310;
padding:5px;
position:absolute;
z-index:1;
}
And the javascript:
-
$('.prod').find('.prod_desc').hide().end().hover(
function() {
$(this).find('.prod_desc').slideToggle();
},
function() {
$(this).find('.prod_desc').slideToggle();
}
);
The problems are as follows:
FF and IE
The containers are "dancing" in some occasions. Is there a way to prevent this?
IE
z-index is not working here. Is there a way to make the prod_desc appear above the thumbs.
Thanks a lot!
[/url]