So I have a list of 9 icons with titles representing 9 different areas of service. Divided into three rows of three using floats etc. Each has a description below it (a couple of paragraphs). I have used 'visibility: hidden' and 'height: 0px' to hide the descriptions. (not at the same time.) I want to hover or mouseover the icon and have the description appear below it.
I don't think I can use straight CSS (unless someone thinks otherwise) because I am triggering one element and changing another.
<div id="category1" class="category_col1 cathead">
<div><img src="images/..." name="category1" class="image-item-lead"/>
<h3>Type of category</h3>
</div>
<div id="category1description" class="hide">
<p>Some content...</p>
<p>Some more content...</p>
</div>
</div>
And we do that two more times per row.
The CSS that is applied to these elements is as follows.
.category_col1 {float:left;
clear:left;
width:32%;
padding:.5em .5em .5em 0em;
}
.image-item-lead {width: 90%;
margin-left:auto;
margin-right:auto;
display:block;
}
.cathead {visibility:visible;
}
.hide {height:0px;
overflow:hidden;
}
The jQuery that I have tried is as follows:
Surrounding all options
$(document).ready(function(){
});
This works:
$('#category1').mouseover(function(event){
$(#category1description).css('height','auto');
});
But obviously it shows up instantly, I would like it to show up gradually. I have tried:
$('#category1').mouseover(function(){
$('#category1descrioption').slideToggle('slow');
});
$('#category1').mouseover(function(){
$('#category1descrioption').animate({height: auto}, {duration:1500});
});
$('#category1').mouseover(function(event){
$('#category1descrioption').transition({height: auto}, ease, 1500);
});
I am definitely missing something here. I hope someone can help.