I have successfully implemented a toggle class for dd & dt
, but now I want to enable show and hide functionality on hover. How can I achieve this?
<div class="navigation">
<dt><?php echo $this->__($_filter->getName()) ?></dt>
<dd><?php echo $_filter->getHtml() ?></dd>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.js"></script>
<script type="text/javascript">
jQuery=$.noConflict();
jQuery(document).ready(function() {
jQuery('.navigation dd').hide();
jQuery('.navigation dt').hover(
function(){
jQuery(this).next('dd').slideDown('slow');
jQuery(this).addClass('glace_navigationlayer-collapsed');
},
function(){
jQuery(this).next('dd').slideUp('slow');
jQuery(this).removeClass('glace_navigationlayer-collapsed');
}
);
});
</script>