using jQuery with Jekyll site hosted on Github pages

淺唱寂寞╮ 提交于 2019-12-22 08:29:51

问题


I have a simpled Jekyll blog hosted on github pages and I have included jQuery and a tablesorter plugin but come across error and to all my knowledge this error is caused by not having jQuery loaded in the correct order. my image below shows the code is in the right order.. so my question is simply is it being stopped by Github itself somehow?

and if so how?

edit: for completion/clarity here is the exact code:

<script type="text/javscript" src="/js/jquery.min.js" ></script>

<script type="text/javscript" src="/js/jquery.tablesorter.min.js" ></script>  

<script type="text/javascript">$(document).ready(function() { 
 if(jQuery("table.tablesorter").length > 0)
   {  
    $.tablesorter.defaults.widgets = ['zebra']; }
   }
 );


回答1:


turns out it's not a jekyll or github issue having copied files to my own server. it seems to be an issue with my plugins and jQuery 2.0.0, going back to 1.9.0 works.

ugh



来源:https://stackoverflow.com/questions/17502943/using-jquery-with-jekyll-site-hosted-on-github-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!