jquery element's place when toggeling
- by Noam Zadok
i'm building a page, which will have categories that will contain a list of pages to go with them. at first all the list are hidden, and than I click on a category and the list slides down. this is the code of the script:
$(document).ready(function() {
$('.menu-list').hide();
$('.menu-title').click(function() {
if ($(this).next().is(':not(:visible)')) {
$('.menu-list:visible').slideUp();
$(this).next().slideDown();
}
});
The script works, but the problem is when I'm clicking on a category in a column that has more categories than the other. than the last category is moving to the left and I don't want it to. Here is the code in jsfiddle: http://jsfiddle.net/U7rKX/4/
Can you help me?