저는 완전한 jquery 초보자입니다. 그러나 나는 나를 시작하기 위해 this tutorial here을 팔로우하고 있습니다.
$(function() {
//This one here works and gets executed after the page has loaded
$.getScript("some link copied from one of the actual hrefs");
//Handler for some links that should load some js from the server and execute it
$('#searchresults .pagination a').live('click',
function(event) {
//This shows the correct link:
alert(this.href);
//However, this one doesn't even send a request:
$.getScript(this.href);
return false;
});
});
: 여기
는 조각 (설명 참조)의 ...
는 나는 이미 모든 작업을했지만, (그리고 나는 심지어 내가 무슨 짓을했는지 모른다) 지금은 모든 것이 추락
JQuery 1.5.2를 사용하고 있습니다.
또한 주목할 가치가 있습니다. 디버깅 목적으로 FireQuery를 설치했으며, 사이트를로드 할 때마다 "jQuery(...) called incorrectly
"으로 공격을 계속합니다. 링크 중 하나를 클릭하면 "When I called jQuery.get(...) with your args, an error was thrown! TypeError: rootjQuery is undefined
"이 표시됩니다.
내 jquery.js 파일이 손상되어서 내가 새로 다운로드하여 설치했다고 생각한 것을보고 나서. 이 운이,하지만 ... 혹시 다른 도메인에서 getScript()하려고하는으로
감사 도움, 들으
url을 $ .getScript로 하드 코딩 해보십시오 (여기서 경고 URL을 붙여 넣으십시오). URL이 유효한 경로인지 확인하십시오. – nolabel