diff options
Diffstat (limited to 'web-ui/app/style-guide.html')
-rw-r--r-- | web-ui/app/style-guide.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/web-ui/app/style-guide.html b/web-ui/app/style-guide.html index 354d9307..d24f0bda 100644 --- a/web-ui/app/style-guide.html +++ b/web-ui/app/style-guide.html @@ -12,6 +12,25 @@ <link href="css/style-guide.css" rel="stylesheet" type="text/css"/> <link rel="stylesheet" href="../css/main.css"> </head> +<script src="/bower_components/jquery/dist/jquery.js"></script> +<script type="text/javascript"> + $(document).ready(function(){ + $('a[href*=#]').click(function() { + if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') + && location.hostname == this.hostname) { + var $target = $(this.hash); + $target = $target.length && $target + || $('[name=' + this.hash.slice(1) +']'); + if ($target.length) { + var targetOffset = $target.offset().top; + $('html,body') + .animate({scrollTop: targetOffset}, 500); + return false; + } + } + }); + }); +</script> <body> <div id="style-guide-wrap" data-offcanvas> |