I am trying to add an anchor to my url in a django template like this:
<a data-hover="Are You At Risk?" href="{% url 'home' %}#container">My link</a>
This does not work.
How can I get this to move to the anchor point when this link is clicked?
Make sure the actual anchor is defined like this in your template:
<a name="container"></a>
And then link to it the way you did:
<a data-hover="Are You At Risk?" href="{% url 'home' %}#container">My link</a>
If this does not work add /
just before your #
-tag:
<a data-hover="Are You At Risk?" href="{% url 'home' %}/#container">My link</a>