I have finally managed to create my tree grid. The problem im having is creating a JQuery function to open the month and years separately.
Ok so the tree looks like so
- 2013
- January
- test
- test
- test
- test
- test
- test
- test
- February
- test
- test
- test
- test
- test
- test
- test
So the code i managed to toggle the year element is
$('li:not(".year")').hide();
$('.year').click(
function(){
$('li:not(".year")').slideUp();
$(this).nextUntil('.year').slideDown();
});
Which when closed is fine but when i toggle it it opens the months as well.
Can someone help me on a function just to open the years then user to click to open each month?