02.html 929 B

12345678910111213141516171819202122232425262728293031
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title id="page-title">HTMX | Chapter 5 demos</title>
  6. <script src="js/htmx-1-9-12.min.js"></script>
  7. <link rel="stylesheet" href="css/styles.css"/>
  8. </head>
  9. <body>
  10. <h1 id="title">Chapter 5 demos</h1>
  11. <h2>Attribute inheritance with <code>hx-boost</code></h2>
  12. <nav hx-get="/autonum/nav" hx-trigger="load"></nav>
  13. <div id="main">
  14. <ul hx-boost="true" hx-target="#main">
  15. <li><a href="/contacts">Contacts</a></li>
  16. <li><a href="/settings">Settings</a></li>
  17. <li><a href="/help">Help</a></li>
  18. <li><a href="/blank.pdf" hx-boost="false">Download Blank docs</a></li>
  19. </ul>
  20. </div>
  21. <p>Notice :</p>
  22. <ul>
  23. <li>how the successful first 2 links replace the div#main</li>
  24. <li>how the 404 on Help does not replace it like a plain a.href normally would,
  25. but the others do.
  26. </li>
  27. <li>How the PDF download is not an AJAX call</li>
  28. </ul>
  29. </body>
  30. </html>