How to reverse the click action of a function
Hi all!
I am just learning jquery (and LOVING it). I am trying to display a hidden bookmarks list when the bookmarks category heading is clicked on. I have gotten as far as writing the script below so that once the heading is clicked, the list drops down and the list items fade in... very cool!
My question is how to I make the list items fade out prior to the list collapsing again?
Here is what i have conjured up so far:
- var $j = jQuery.noConflict();
//online bookmarks
$j(document).ready(function() {
$j('#online-links').click(function() {
$j('#online-links ul').slideToggle('300', function() {
$j('#online-links li a').fadeIn('1000');
});
});
});