이게 왜 작동을 안할까요 ㅠㅠ 정보
이게 왜 작동을 안할까요 ㅠㅠ본문
<script type="text/javascript">
onscroll = function() {
var searchform = document.getElementById("searchform");
var scrollsurvey = document.documentElement.scrollTop || document.body.scrollTop;
searchform = scrollsurvey > 50 ?
searchform || (searchform.style.visibility="visible", true)
: searchform && (searchform.style.visibility="hidden", false);
};
</script>
저로써는 당최 알수가 없네요 ㅠㅠ
원래대로라면 스크롤이 50px 이상 되었을 때에는
searchform DIV 레이어가 hidden 에서 visible 이 되면서
화면에 나타나야 하는데 ㅠㅠ
추천
0
0
댓글 2개

음전체적인 소스를 봐야 할꺼같지만 onscroll 이벤트가 실행되는 구간도 보여주셨으면... 그리고 로그기록도 보여주시면 좋겠는데
두번째 줄에서 searchform 이 폼 object로 설정이 되었지만 4번째 줄에서는 searchform이 integer값이 되었습니다. 따라서 searchform.style.visibility란 존재하지 않습니다.