사용자함수 버튼태그 안의 이미지를 롤로버 버튼으로 처리하기
페이지 정보

본문
<button><img src="btn_play_out.png" /></button>
----------------------------------------------------------
페이지의 버튼태그 안에 있는 이미지버튼들의 소스에서 마지막 _out 과 _over의 파일명을 바꾼다.
$("button>img").hover(
function(){
$(this).attr("src",
function(index,src){
return src.replace('_out','_over');
}
);
},
function(){
$(this).attr("src",
function(index,src){
return src.replace("_over","_out");
}
);
}
);
- 이전글html5에서 녹음기능 - navigator.getUserMedia 16.04.18
- 다음글버튼 클릭하여 이용한 레이어 보이고 감추기 16.03.09
댓글목록
등록된 댓글이 없습니다.

