diff --git a/addons/website_blog/static/src/js/website_blog.js b/addons/website_blog/static/src/js/website_blog.js index 0c2f33f9c3c..9d339fd47ca 100644 --- a/addons/website_blog/static/src/js/website_blog.js +++ b/addons/website_blog/static/src/js/website_blog.js @@ -23,4 +23,17 @@ $(document).ready(function() { } }); } + + $('a[href^="#"]').on('click',function (e) { + e.preventDefault(); + + var target = this.hash, + $target = $(target); + + $('html, body').stop().animate({ + 'scrollTop': $target.offset().top + }, 900, 'swing', function () { + window.location.hash = target; + }); + }); });