I think I wrote myself in a corner and don’t know how to backup. I just need to make each div individually closed, as well as close all options.
http://jsfiddle.net/7U9QY/4/
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
$(function() {
$('.bar').click(function() {
$('.full').toggle(600);
});
});
source
share