[jQuery] jQuery, image changing on hover 마우스오버 이미지 변환 > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

[jQuery] jQuery, image changing on hover 마우스오버 이미지 변환

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 51,126회 작성일 17-04-08 23:25

본문

<img class="xyz" data-alt-src="http://cdn1.iconfinder.com/data/icons/fatcow/32/accept.png" src="http://cdn1.iconfinder.com/data/icons/fatcow/32/cancel.png" />
<br/>
<img class="xyz" data-alt-src="http://cdn1.iconfinder.com/data/icons/fatcow/32/accept.png" src="http://cdn1.iconfinder.com/data/icons/fatcow/32/cancel.png" />
<br/>
<img class="xyz" data-alt-src="http://cdn1.iconfinder.com/data/icons/fatcow/32/accept.png" src="http://cdn1.iconfinder.com/data/icons/fatcow/32/cancel.png" />

 

 

<script>
var sourceSwap = function () {
    var $this = $(this);
    var newSource = $this.data('alt-src');
    $this.data('alt-src', $this.attr('src'));
    $this.attr('src', newSource);
}

$(function () {
    $('img.xyz').hover(sourceSwap, sourceSwap);
});
</script> 

댓글목록

등록된 댓글이 없습니다.

Total 829건 5 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 날짜
729 제로 44112 07-10
열람중 제로 51127 04-08
727 제로 42818 03-15
726 제로 44451 01-25
725 제로 48437 01-24
724 제로 42741 01-16
723 제로 38216 01-05
722 제로 41743 12-05
721 제로 42534 10-30
720 제로 45971 09-28
719 제로 43925 09-27
718 제로 56136 08-25
717 제로 53130 08-25
716 제로 44339 08-23
715 제로 57352 08-22
714 제로 40438 08-05
713 제로 46012 08-05
712 제로 42472 08-04
711 제로 42209 07-28
710 제로 44873 07-26
709 제로 43150 06-02
708 제로 65785 05-17
707 제로 64166 05-04
706 제로 41023 04-27
705 제로 49966 04-19

검색


사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5470-4714
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
24,829
어제
37,399
최대
552,140
전체
16,168,483
Copyright (c) 株式会社YHPLUS. All rights reserved.