var main = function() {
$('.article').click(function() {
if($(this).hasClass('current')) {
$(this).children('.description').toggle("slow");
}
else {
$('.article').removeClass('current');
$('.description').hide();
$(this).addClass('current');
$(this).children('.description').toggle("slow");
};
});
}
$(document).ready(main);
Hello, I would like to know how to learn how to do a few things with my little on-click toggle list:
Im having a hard time on how to make this toggle list to remain persistent after a user clicks on an already opened article. Right now the way I have it setup the current article will toggle whenever clicked on, I would like it to remain open and to only close when clicked on the heading itself (opposed to anywhere in the item).
Also
+ How to create an open/close all toggle link
+ continuity visual cues that shows list is expandable and if it is either open or closed that will fit this style