Fix broken selectors for numeric anchors

This commit is contained in:
squidfunk 2017-01-03 22:12:49 +01:00
parent b22e571f31
commit 9617716652
3 changed files with 3 additions and 3 deletions

View File

@ -110,7 +110,7 @@
<script src="https://cdn.mathjax.org/{{ path }}"></script>
{% endif %}
{% endfor %}
<script src="{{ base_url }}/assets/javascripts/application-7d4b61265c.js"></script>
<script src="{{ base_url }}/assets/javascripts/application-c57ff8e45a.js"></script>
<script>var config={url:{base:"{{ base_url }}"}},app=new Application(config);app.initialize()</script>
{% for path in extra_javascript %}
<script src="{{ path }}"></script>

View File

@ -43,7 +43,7 @@ export default class Blur {
/* Index anchor node offsets for fast lookup */
this.anchors_ = [].map.call(this.els_, el => {
return document.querySelector(el.hash)
return document.getElementById(el.hash.substring(1))
})
}