Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make possible to update to latest jQuery #78

Open
tsouk opened this issue Jun 15, 2017 · 0 comments
Open

Make possible to update to latest jQuery #78

tsouk opened this issue Jun 15, 2017 · 0 comments

Comments

@tsouk
Copy link

tsouk commented Jun 15, 2017

Couldn't commit to a branch so I am suggesting these two changes:

--- a/_includes/javascripts.html
+++ b/_includes/javascripts.html
@@ -1,4 +1,4 @@
-<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
+<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
 <script type="text/javascript" src="{{ "/assets/js/jquery.fitvids.js" | prepend: site.baseurl  }}"></script>
 <script type="text/javascript" src="{{ "/assets/js/index.js" | prepend: site.baseurl  }}"></script>
 <script type="text/javascript" src="{{ "/assets/js/readingTime.min.js" | prepend: site.baseurl  }}"></script>
@@ -23,7 +23,7 @@
       var height = $('.article-image').height();
       $('.post-content').css('padding-top', height + 'px');

-      $('a[href*=#]:not([href=#])').click(function() {
+      $('a[href*=\\#]:not([href=\\#])').click(function() {
         if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
          && location.hostname == this.hostname) {
           var target = $(this.hash);

First one just as it is quite likely users will have that file.
Second one because it is what made jQuery 3.2.1 (latest) fail when I loaded it.

Cheers!
Nikos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant