ID 속성을 변경하려고 시도한 적이 있습니다. 요청이 === 0 일 경우 자동로드 아래에 콘텐츠를 만들 수있는 방법이 있습니까? 클릭 기능이 필요하지 않습니다.jQuery로 자동로드 할 DIV 얻기
<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 (requests === 0)'의도적입니까? 냄새가 난다. – strager