I have a large list where each li element has a width of 33%, resulting in 3 columns:
computers monitors hi-fi
sex-toys pancakes scissors
Each column contains a hidden UL, which is revealed through slideToggle on click.
JQuery
$('.subCategory > .parentleaf:has(ul) > .categoryicon').click(function() {
$(this).siblings('ul').slideToggle('fast');
});
The issue is that the sliding behavior is not as desired, causing the list to rearrange like this:
computers monitors hi-fi
[li]cars sex-toys pancakes
[li]dogs scissors
The desired sliding effect should look like this:
computers monitors hi-fi
[li]cars pancakes scissors
[li]dogs
sex-toys
How can I achieve this?
jsFiddle 2 - in this case need the red bg color be for 3 columns