Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not use async to load scripts that depend on one another (Fixes #117)
  • Loading branch information
zoffixznet committed Aug 22, 2015
1 parent 6c72b35 commit 11e098f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 4 additions & 0 deletions template/footer.html
Expand Up @@ -14,3 +14,7 @@
</p>
</div> <!-- footer -->
</div> <!-- footer-wrapper -->

<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.21.custom.min.js"></script>
<script type="text/javascript" src="/js/search.js"></script>
4 changes: 1 addition & 3 deletions template/head.html
Expand Up @@ -3,6 +3,4 @@
<link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" title="default" />
<link type="text/css" href="/css/custom-theme/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
<link type="text/css" href="/css/pygments.css" rel="stylesheet" />
<script async type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script async type="text/javascript" src="/js/jquery-ui-1.8.21.custom.min.js"></script>
<script async type="text/javascript" src="/js/search.js"></script>

4 changes: 1 addition & 3 deletions template/search_template.js
@@ -1,6 +1,4 @@
// cannot use $(...) here, because jQuery is loaded asynchronously,
// and might not be available yet.
document.addEventListener("DOMContentLoaded", function(event) {
$(function(){
$('#search').css('visibility', 'visible');
$("#query").autocomplete({
position: { my: "right top", at: "right bottom", of: "#search div" },
Expand Down

0 comments on commit 11e098f

Please sign in to comment.