I created a foldable menu with a line like:
I have the following javascript
var config = { over: function() { $(this).children('ul').slideDown('slow'); }, timeout: 5, out: function() { } } $("ul.root-tags li").hoverIntent(config); $('ul.root-tags').mouseout(function() { $(this).children('li ul').each(function () { $(this).slideUp('slow'); }); });
Basically, I want to open subcategories when hovering the parent element, but only collapse the open subcategories in the output of the entire list, and not just the parent element. My current code does not do this. What changes do I need to make?
jsfiddle here http://jsfiddle.net/zkhVC/4/
source share