Skip to content

Instantly share code, notes, and snippets.

@artiomchi
Created July 18, 2012 16:14
Show Gist options
  • Save artiomchi/3137222 to your computer and use it in GitHub Desktop.
Save artiomchi/3137222 to your computer and use it in GitHub Desktop.
Sliding panel from http://www.atlanticbt.com/
$('#site-tools').append('<div id="toggle-link"><a href="#">Open</a></div>');
$('#toggle-link a').click(function () {
if ($('#toggle-link').attr('class') != "open") {
$('#toggle-link').toggleClass('open');
$('#toggle-link').animate({
top: "150px"
}, 500);
$('#site-tools div.tools-wrap').animate({
top: "0"
}, 500);
$('#wrapper').animate({
paddingTop: "150px"
}, 500);
$('#main-nav ul').animate({
top: "190px"
}, 500);
$('#phone-number strong').animate({
top: "27px"
}, 500);
$('#landing-nav').animate({
top: "250px"
}, 500);
} else {
$('#toggle-link').toggleClass('open');
$('#toggle-link').animate({
top: "0"
}, 500);
$('#site-tools div.tools-wrap').animate({
top: "-150px"
}, 500);
$('#wrapper').animate({
paddingTop: "0"
}, 500);
$('#main-nav ul').animate({
top: "40px"
}, 500);
$('#phone-number strong').animate({
top: "27px"
}, 500);
$('#landing-nav').animate({
top: "100px"
}, 500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment