[jQuery] jQuery로 만든 롤오버 이미지 소스 > 팁앤테크

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

팁앤테크

[jQuery] jQuery로 만든 롤오버 이미지 소스

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 82,058회 작성일 14-03-29 22:29

본문

롤오버 이미지 스크립트를 jquery로 간단하게 만들어 봤습니다. .menu 안의 링크(<a>)로 싸인 이미지에 마우스오버시 확장자앞에 _r 을 붙이고 마우스아웃시 _r 을 떼는 소스입니다.

<div class="menu">
<a href="#"><img src="http://i1.daumcdn.net/cfs.tistory/static/images/xBoxReplace_250.png" height="250" width="250"></a>
<a href="#"><img src="http://i1.daumcdn.net/cfs.tistory/static/images/xBoxReplace_250.png" height="250" width="250"></a>
<a href="#"><img src="http://i1.daumcdn.net/cfs.tistory/static/images/xBoxReplace_250.png" height="250" width="250"></a>
</div>

<script type="text/javascript">
$(document).ready(function()
{
    $(".menu a img").mouseover(function()
    {
        $(this).attr("src", $(this).attr("src").replace(/(.gif|.jpg|.png)$/, "_r$1"))
    }).mouseout(function()
    {
        $(this).attr("src", $(this).attr("src").replace(/_r(.gif|.jpg|.png)$/, "$1"));
    });
});
</script>

댓글목록

등록된 댓글이 없습니다.

Total 829건 8 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 날짜
654 제로 66602 11-20
653 제로 88409 11-19
652 제로 52737 11-17
651 제로 58678 11-17
650 제로 75860 11-07
649 제로 87555 10-24
648 제로 76948 10-22
647 제로 85725 10-07
646 제로 83457 07-02
645 제로 71212 06-18
644 제로 71492 06-11
643 제로 78134 06-11
642 제로 68097 05-09
641 제로 82276 05-02
열람중 제로 82059 03-29
639 제로 74819 01-22
638 제로 72135 01-09
637 제로 81435 01-08
636 제로 78531 01-06
635 제로 103568 12-31
634 제로 80574 12-26
633 제로 78008 12-24
632 제로 78261 12-01
631 제로 76299 11-21
630 제로 54924 11-08

검색


사이트 정보

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

접속자집계

오늘
333,806
어제
547,766
최대
552,140
전체
18,358,517
Copyright (c) 株式会社YHPLUS. All rights reserved.