Webサイト用の小さな達成リストを作成しています。私はリストが1つのjsドキュメントにある可能性があるのだろうかと思っています。そして、彼らが得た成果によって、それぞれの文字列を呼び出します。そうすれば、私は自分のリストを一つのドキュメントに入れ、コードは別のドキュメントに入れておくだろう。私はこれをどのように作成しようとしますか?jsファイルの段落を取得し、別のjsファイルのdivに挿入します。
編集: さて、私はこれについて私が心に持っているものを少し良く説明しようとします。
<p>Achievement 1 - Some text goes here as well</p>
<p>Achievement 2 - Some text goes here as well</p>
<p>Achievement 3 - Some text goes here as well</p>
<p>Achievement 4 - Some text goes here as well</p>
if(level === 5) {
$('#achievement2').animate({left:"10px"}, function(){
$(this).delay(3500).fadeOut(500).promise();
});
$('.achievementCont').append(Achievement 1);
}
よくある質問をここで確認するには、ヘルプページをご覧ください。 – isherwood
多分これは助けになるでしょう[http://stackoverflow.com/questions/6734552/newbie-question-connect-two-functions-int-two-files](http://stackoverflow.com/questions/6734552/newbie-question) -connect-two-functions-int-two-files)を使用します。それが役に立てば幸い。 –
@isherwood私はこれを行うための手がかりを持っていたコードを提供していたでしょう。 –