CSS
.con dl dt { position:relative;} .con dl dt img.on { position:absolute;opacity:0;top:0;left:0;}
HTML
![]()
![]()
- 첫번째내용
![]()
![]()
- 두번째내용
![]()
![]()
- 세번째내용
jQuery
$(".con dl").hover(function(){ var $this = $(this); var $on = $this.find("img.on"); $on.stop().animate({"opacity":1}, 450, "swing"); $(this).find("dd").css('color','#4a8ef3'); }, function(){ var $this = $(this); var $on = $this.find("img.on"); $on.stop().animate({"opacity":0}, 350, "swing"); $(this).find("dd").css('color','#1f1f1f'); });
'JavaScript > jQuery' 카테고리의 다른 글
[jQuery] 스크롤 따라다니는 퀵메뉴 (0) | 2018.01.08 |
---|---|
[jQuery] 이미지의 경로와 사이즈 구하기 (0) | 2017.12.13 |
[jQuery] fulldown메뉴 만들기(풀다운) (0) | 2017.11.08 |
[jQuery] 탭메뉴 만들기 (0) | 2017.11.06 |
[jQuery] 자신을 제외한 객체 선택 .not() (0) | 2017.11.03 |