Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
landing_page: Fix anchor links on landing pages.
Eeshan Garg78ff74d3fd12
diff --git a/static/js/portico/help.js b/static/js/portico/help.jsindex 04a93d8c3fe..fb7575e27db 100644--- a/static/js/portico/help.js+++ b/static/js/portico/help.js@@ -144,7 +144,9 @@ if (window.location.pathname === "/help/") {// Remove ID attributes from sidebar links so they don't conflict with index page anchor links$(".help .sidebar h1, .help .sidebar h2, .help .sidebar h3").removeAttr("id");-// Scroll to anchor link when clicked+// Scroll to anchor link when clicked. Note that landing-page.js has a+// similar function; this file and landing-page.js are never included+// on the same page.$(document).on("click",".markdown .content h1, .markdown .content h2, .markdown .content h3",diff --git a/static/js/portico/landing-page.js b/static/js/portico/landing-page.jsindex 1700d717367..f8f736aa167 100644--- a/static/js/portico/landing-page.js+++ b/static/js/portico/landing-page.js@@ -246,3 +246,10 @@ $(() => {}});});++// Scroll to anchor link when clicked. Note that help.js has a similar+// function; this file and help.js are never included on the same+// page.+$(document).on("click", ".markdown h1, .markdown h2, .markdown h3", function () {+ window.location.hash = $(this).attr("id");+});