root.html: protect $ symbol from overwriting (#7589)

$ can be overwritten by the jQuery loaded by django-debug-toolbar in the
messages fadeout callback, it prevents that.
This commit is contained in:
Benjamin Dauvergne 2015-06-17 09:14:12 +02:00
parent a666d7d47e
commit 504b43a246
1 changed files with 6 additions and 1 deletions

View File

@ -60,7 +60,12 @@
{% endfor %}
</ul>
<script>
$(document).ready(function() { $('.messages').delay(5000).fadeOut('slow'); });
(function () {
var $ = jQuery;
$(document).ready(function() {
$('.messages').delay(5000).fadeOut('slow');
});
})();
</script>
{% endif %}
{% endblock %}