请拿一本较新的书,或者只是使用网页作为资源,任何信息。从1997年起将会非常过时。
这是一个非常简单的网站,我建议初学者之前:http://htmldog.com/guides/javascript/ 不,它并不包括所有内容,但是这样做很好,你会得到一些关键的东西,然后能够搜索谷歌更具体的东西。
给你一些准系统加时赛开始时,我会做这样的事情:
$(document).ready(function() {
$('#nextBtn').click(function() {
transitionToNextImage();
});
});
transitionToNextImage = function() {
$('img.active-image').fadeTo(1000,0), function() {
// fade out complete.
$('#inProgressGif').show();
getNextImage();
});
};
getNextImage = function() {
// make ajax call to get new image, and
// in the success callback of the ajax call,
// remove the inProgressGif, and
// add the image ot the DOM with opacity 0,
// then slowly fade it in to opacity 1 (opposite
// of what was done above
};