Last active
December 11, 2015 18:39
-
-
Save Saturate/4643096 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toggleHeader(e) { | |
$('.header-user-info') | |
.css({opacity: 0.0, visibility: "visible"}) | |
.animate({marginTop: '0px', opacity: 1.0}, 500); | |
$('.header-close-user-info') | |
.css({opacity: 0.0, visibility: "visible", display: "inline-block"}) | |
.animate({opacity: 1.0}, 500); | |
$('.overlay') | |
.css({opacity: 0.0, visibility: "visible"}) | |
.animate({opacity: 0.7}, 500); | |
$('.header-right').delay(200).queue(function(){ | |
$(this).addClass("header-right-pushed").dequeue(); | |
}); | |
$('.header-open-user-info').off('click', toggleHeader); | |
$('.input').focus(); | |
} | |
function updateUI() { | |
var element = '.content-left, .content-right'; | |
var elementRemoveHeight = 81; | |
$(element).css('height', $(window).height() - elementRemoveHeight); | |
} | |
$(function(){ | |
$('.poplink').tipsy({fade: true, gravity: 's'}); // nw | n | ne | w | e | sw | s | se | |
// NanoScroll needs this a second time to work. | |
$(document).ready(function() { | |
$('.nano').nanoScroller({ | |
preventPageScrolling: true | |
}); | |
}); | |
$('.header-open-user-info').on('click', toggleHeader); | |
$('.header-close-user-info, .overlay').on('click', function() { | |
$('.header-user-info') | |
.css({opacity: 1.0, visibility: "visible"}) | |
.animate({marginTop: '-170px', opacity: 0.0}, 250); | |
$('.header-close-user-info') | |
.css({opacity: 1.0, visibility: "visible", display: "none"}) | |
.animate({opacity: 0.0}, 300); | |
$('.overlay') | |
.css({opacity: 0.7, visibility: "hidden"}); | |
$('.header-right').delay(170).queue(function(){ | |
$(this).removeClass("header-right-pushed").dequeue(); | |
}); | |
$('.header-open-user-info').on('click', toggleHeader); | |
}); | |
$(window).resize(updateUI); | |
updateUI(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment