Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 3, 2015
1 parent 58a5e6a commit 60eda23
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Mojolicious/resources/templates/mojo/menubar.html.ep
Expand Up @@ -82,7 +82,7 @@
<script>
var mojobar = $('#mojobar');
var mojobarHeight = mojobar.outerHeight();
function getElementByHash(hash){
function getElementByHash(hash) {
return $(hash.replace(/(:|\.|\[|\]|,)/g, '\\$1'));
}
function fixOffset() {
Expand Down Expand Up @@ -131,11 +131,11 @@
$('.mojoscroll').click(function (e) {
e.preventDefault();
e.stopPropagation();
var anchor = '#' + this.href.split('#')[1];
var target = getElementByHash(anchor);
var hash = '#' + this.href.split('#')[1];
var target = getElementByHash(hash);
var old = target.attr('id');
target.attr('id', '');
location.hash = anchor;
location.hash = hash;
target.attr('id', old);
fixOffset();
});
Expand Down

0 comments on commit 60eda23

Please sign in to comment.