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?
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:
And then link to it the way you did:
If this does not work add
/
just before your#
-tag:past it between your anchor tag: