웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
링크가 걸려있는 모든 이미지에 마우스 올리면 서서히 밝아지게 하는 소스입니다.
2003.01.09 19:19
링크가 걸려있는 모든 이미지에 마우스를 올리면 반복적으로 서서히 밝아지게 하는 효과입니다.
아래 태그를 </head>위에 삽입하세요.
보기는 좋은데요..이소스가 작동하는 순간은 CPU 사용이 100% 된답니다.ㅠㅠ
사용해도 무리는 없을까요? 다른분들은 어떻게 생각하시는지요?
<SCRIPT>
var globopObject;
var opIndex=0;
var cleared=true;
var direction=10;
function dynOpacity(opObject,stop)
{
if (stop)
{
clearInterval(window.tm);
cleared=true;
opIndex=10;
return;
}
globopObject=opObject;
if (opIndex>110) direction=-4;
if (opIndex<0) direction=4;
opIndex+=direction;
globopObject.style.filter='alpha(opacity:' + opIndex + ')';
if (cleared)
{
window.tm=setInterval("dynOpacity(globopObject,false);",1);
cleared=false;
}
//alert(window.tm);
}
function handleevent()
{
if (event.type=="mouseover")
if(event.srcElement.tagName=="IMG")
if (event.srcElement.parentElement.tagName=="A")
{
dynOpacity(event.srcElement,false);
}
if (event.type=="mouseout")
if(event.srcElement.tagName=="IMG")
{
event.srcElement.style.filter="";
dynOpacity(event.srcElement,true);
}
}
document.onmouseover=handleevent;
document.onmouseout=handleevent;
</SCRIPT>
아래 태그를 </head>위에 삽입하세요.
보기는 좋은데요..이소스가 작동하는 순간은 CPU 사용이 100% 된답니다.ㅠㅠ
사용해도 무리는 없을까요? 다른분들은 어떻게 생각하시는지요?
<SCRIPT>
var globopObject;
var opIndex=0;
var cleared=true;
var direction=10;
function dynOpacity(opObject,stop)
{
if (stop)
{
clearInterval(window.tm);
cleared=true;
opIndex=10;
return;
}
globopObject=opObject;
if (opIndex>110) direction=-4;
if (opIndex<0) direction=4;
opIndex+=direction;
globopObject.style.filter='alpha(opacity:' + opIndex + ')';
if (cleared)
{
window.tm=setInterval("dynOpacity(globopObject,false);",1);
cleared=false;
}
//alert(window.tm);
}
function handleevent()
{
if (event.type=="mouseover")
if(event.srcElement.tagName=="IMG")
if (event.srcElement.parentElement.tagName=="A")
{
dynOpacity(event.srcElement,false);
}
if (event.type=="mouseout")
if(event.srcElement.tagName=="IMG")
{
event.srcElement.style.filter="";
dynOpacity(event.srcElement,true);
}
}
document.onmouseover=handleevent;
document.onmouseout=handleevent;
</SCRIPT>
댓글 3
제목 | 글쓴이 | 날짜 |
---|---|---|
텍스트 폼에 커서가 미리 깜빡이도록... [8] | 카리 | 2003.01.22 |
[레드-자바 스크립트초보] 더블클릭하면 경고창 뜬후 사이트 이동하기 [7] | 레드 | 2003.01.17 |
성인인증 받는 소스입니다..... [17] | q333 | 2003.01.12 |
디지털 시계입니다. [8] | q333 | 2003.01.12 |
1 분마다 배경이 빠뀌는 소스...입니다. [1] | q333 | 2003.01.12 |
IE6SP1 에서 작동하는 크롬리스윈도우!![ByKlein_Chromeless_Window1.0] [13] | 술도짱 | 2003.01.10 |
[1분짜리 팁!] 홈페이지 입장 여부 묻는 폼 띄우기! [2] | 찐군 | 2003.01.09 |
자바스크립트용 계산기 v1.0 [4] | 찐군 | 2003.01.09 |
링크가 걸려있는 모든 이미지에 마우스 올리면 서서히 밝아지게 하는 소스입니다. [3] | 정해식 | 2003.01.09 |
혹시 이런것도 될까-_-;;. 시노부 플레이어에서 랜덤 모드 사용자가 택하게 하기 | TuTy | 2003.01.09 |
홈페이지 패스워드(암호) 걸기 소스 [6] | keymove | 2003.01.09 |
select form 으로 새 창 띄우기 [4] | 당근당근 | 2003.01.07 |
[re] select form 으로 새 창 띄우기(간단버전) [3] | RedEye | 2003.01.27 |
갤러리스킨에 쓰면 좋을 것 같은 미리보기(수정2) [10] | 행복한고니 | 2003.01.06 |
크롬리스에 응용할만한 소스;; [3] | MYMob.INT. | 2003.01.05 |
숫자를 한글로 변환하는 함수 [1] | 행복한고니 | 2003.01.03 |
mid 랜덤으로 듣기 ... [2] | 아벨라 | 2003.01.02 |
색다른 링크법(새창) [2] | BIRDY™ | 2002.12.30 |
텍스트 폼 / 전체선택 하기 자바스크립 | mnemosyne | 2002.12.24 |
div, Javascript 이용해서 섹션 테이블 만들기 [3] | mnemosyne | 2002.12.18 |