<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>hastag on Curtis Timson</title><link>https://hugo.curtiscode.dev/tags/hastag/</link><description>Recent content in hastag on Curtis Timson</description><generator>Hugo -- gohugo.io</generator><language>en-GB</language><lastBuildDate>Sun, 27 Jan 2013 00:00:00 +0000</lastBuildDate><atom:link href="https://hugo.curtiscode.dev/tags/hastag/index.xml" rel="self" type="application/rss+xml"/><item><title>Reading URL hashtag values</title><link>https://hugo.curtiscode.dev/post/js/reading-url-hashtag-values/</link><pubDate>Sun, 27 Jan 2013 00:00:00 +0000</pubDate><guid>https://hugo.curtiscode.dev/post/js/reading-url-hashtag-values/</guid><description>URL hashtags were primarily used in order to position the page scroll on load to a particular element.
With javascript we can access what the value of the hashtag is on page load.
if (window.location.hash){ var hash = window.location.hash.substring(1); alert(&amp;#34;hashtag value is &amp;#39;&amp;#34; + hash + &amp;#34;&amp;#39;&amp;#34;); } This snippet first checks that the URL contains a hashtag, and then uses substring() to remove the hash (#) character from the start of the string.</description></item></channel></rss>