我抓住了我以前的嘗試,改變了ID屬性。如果請求=== 0,是否有辦法讓內容低於自動加載?而不是點擊功能。獲取一個DIV以自動加載jQuery
<script language="javascript">
var requests = 10;
function request(self)
{if(self.href != "#")
requests -= 1;
if(requests === 0)
var pageid = function() {
var thisID = null;
$('#step').click(function() {
thisID = this.id;
$('#content').animate({
height: getPageHeight()
},
700, function() {
$('#next-page').fadeIn(500);
$('#content-' + thisID).fadeIn(500, function() {});
});
return false;
});
};
$(window).load(pageid);
function getPageHeight() {
var windowHeight;
if (self.innerHeight) windowHeight = self.innerHeight;
else if (document.documentElement && document.documentElement.clientHeight) windowHeight = document.documentElement.clientHeight;
else if (document.body) windowHeight = document.body.clientHeight;
return windowHeight;
}}
</script>
那是'if(要求=== 0)'故意嗎?它很臭。 – strager 2009-09-12 01:35:36