I found this code for a slide in/out sidebar. How to let it slide in after the website is loaded so people can sneak peak the content a bit?
(function sidebar() {
var sidebar = $('#sidebar').show(),
sidebarButton = $('#sidebarButton', sidebar),
w = sidebar.outerWidth();
sidebar.css('left', '-' + w + 'px');
sidebarButton.toggle (
function() {
sidebar.css('left', 0).show('slide', { easing: 'easeOutCubic' }, 1000, function() {
sidebarButton.css('right', '-20px');
});
},
function() {
sidebar.animate({ left: '-' + w + 'px' }, 1000, 'easeOutCubic');
sidebarButton.css('right', '-20px');
}
);
}());
Thanks