Fixed slidr error (cannot find element with id 'slidr-div')
This commit is contained in:
parent
81001825a3
commit
f0713e9945
@ -113,11 +113,13 @@
|
||||
</main>
|
||||
|
||||
<script>
|
||||
slidr.create('slidr-div', {
|
||||
controls: false,
|
||||
timing: {'linear': '0.5s ease-in'},
|
||||
theme: '#666',
|
||||
touch: true
|
||||
}).add("h", [{% for post in posts %}"{{ post.id }}", {% endfor %} {% if posts|length > 1 %}"{{ posts.0.id }}"{% endif %}]).start().auto();
|
||||
if (document.getElementById('slidr-div')) {
|
||||
slidr.create('slidr-div', {
|
||||
controls: false,
|
||||
timing: {'linear': '0.5s ease-in'},
|
||||
theme: '#666',
|
||||
touch: true
|
||||
}).add("h", [{% for post in posts %}"{{ post.id }}", {% endfor %} {% if posts|length > 1 %}"{{ posts.0.id }}"{% endif %}]).start().auto();
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user