Thu Jul 06 2023 11:43:13 GMT+0000 (Coordinated Universal Time)
Saved by @gshailesh27
$('a[href^="#"]').on('click',function (e) { // e.preventDefault(); var target = this.hash, $target = $(target); $('html, body').stop().animate({ 'scrollTop': $target.offset().top-100 }, 900, 'swing', function () { window.location.hash = target; }); });
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments