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

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

팁앤테크

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

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 51,120회 작성일 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 제로 44107 07-10
열람중 제로 51121 04-08
727 제로 42809 03-15
726 제로 44444 01-25
725 제로 48429 01-24
724 제로 42735 01-16
723 제로 38209 01-05
722 제로 41737 12-05
721 제로 42526 10-30
720 제로 45960 09-28
719 제로 43920 09-27
718 제로 56131 08-25
717 제로 53122 08-25
716 제로 44334 08-23
715 제로 57342 08-22
714 제로 40430 08-05
713 제로 46002 08-05
712 제로 42466 08-04
711 제로 42200 07-28
710 제로 44865 07-26
709 제로 43142 06-02
708 제로 65773 05-17
707 제로 64156 05-04
706 제로 41018 04-27
705 제로 49960 04-19

검색


사이트 정보

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

접속자집계

오늘
22,244
어제
37,399
최대
552,140
전체
16,165,898
Copyright (c) 株式会社YHPLUS. All rights reserved.