fix #1076 where the anchor was not stopped from being followed after clicking expand/collapse

This commit is contained in:
Reinier Balt 2011-02-08 22:55:50 +01:00
parent 52a50b7463
commit 98679cfb1b

View file

@ -258,13 +258,15 @@ var TodoItemsContainer = {
imgSrc = $(this).find('img').attr('src');
$(this).find('img').attr('src', imgSrc.replace('collapse', 'expand'));
$.cookie(TodoItemsContainer.buildCookieName(this.parentNode.parentNode), true);
toggle_target.slideUp(500);
} else {
// show it
imgSrc = $(this).find('img').attr('src');
$(this).find('img').attr('src', imgSrc.replace('expand', 'collapse'));
$.cookie(TodoItemsContainer.buildCookieName(this.parentNode.parentNode), null);
toggle_target.slideDown(500);
}
toggle_target.toggle('blind');
return false;
});
// set to cookied state
$('.container.context').each(function(){