是否有一个jQuery函数来加载存储在Pastebin(http://pastebin.com/raw/AAirNTgx)或GitHub(https://raw.githubusercontent.com/DarkPotatoKing/darkpotatoking.github.io/master/IskoDuler.js)中的jQuery脚本?
答案 0 :(得分:0)
$.ajax({
url: url,
dataType: "script",
success: success //success callback handler..
});
或$.getScript()
并使用https://rawgit.hubusercontent.com
NOT raw.githubusercontent.cpm
之类的网址。为什么? Read here
我能够加载。 Check jsbin here
答案 1 :(得分:0)
您可以通过替换源文件或路径文件
来尝试此操作<script>
$( "#new-projects" ).load( "/resources/load.html #projects li" );
</script>