Skip to content

Commit

Permalink
small mojobar tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 13, 2012
1 parent d708062 commit 2256132
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Mojolicious/templates/mojobar.html.ep
Expand Up @@ -72,8 +72,12 @@
</div>
%= javascript begin
$(window).load(function () {
if (window.location.hash) {
var tweak = $(window.location.hash).offset().top - 70;
$('html, body').animate({scrollTop:tweak}, 1);
}
var mojobar = $('#mojobar');
var start = mojobar.offset().top;
var start = mojobar.offset().top;
var fixed;
$(window).scroll(function () {
if (!fixed && (mojobar.offset().top - $(window).scrollTop() < 0)) {
Expand Down

0 comments on commit 2256132

Please sign in to comment.