htmx/test/manual/anchors/index.html
Carson Gross 7e7a5b4361 fix https://github.com/bigskysoftware/htmx/issues/827
keep local URL anchors along for the magical ride into the history API, and scroll to the target directly to avoid adding a junk history entry along the way

have i mentioned that I hate the javascript history API?
2022-07-11 13:34:40 -06:00

13 lines
395 B
HTML

<html lang="en">
<head>
<meta charset="utf-8" />
<title>Test if indicators are invisible by default</title>
<script src="../../../src/htmx.js"></script>
</head>
<body style="padding:20px;font-family: sans-serif">
<a hx-boost="true" href="has-anchors.html#anchor1">Anchor 1</a>
<button hx-push-url="true" hx-get="has-anchors.html#anchor2" hx-target="body">Anchor 2</button>
</body>