아래 함수는 해당 페이지로 갔을때 on 이미지로 보이는 함수인데요
마우스 오버시 롤오버 효과를 추가 할려고 합니다..
어떻게 추가를 해줘야 할까요?
$("img.gnbimg").mouseover(function() {
$(this).attr("src", $(this).attr("src").replace("_off","_on"));
});
를 이용해서 아래 함수에 롤오버를 적용해볼려고 하는데 잘 되지 않네요^^
위 함수를 따로 추가 하니까 페이지로 갔을때 또 롤오버가 실행되면서 꼬이더라구요..
Copy
if (depth1code != 0){ var top_dep = $('.gnb').children().eq( depth1code -1 ); top_dep.addClass('active'); var top_dep1 = top_dep.find('a').eq(0).find('img') ; var top_dep1_src =top_dep1.attr('src').replace(".gif","_on.gif"); top_dep1.attr('src', top_dep1_src ); var top_dep2 = top_dep.find('li').eq(depth2code-1).find('img') ; var top_dep2_Src = top_dep2.attr('src').replace(".gif","_on.gif"); top_dep2.attr('src', top_dep2_Src ); }
답변 1개
답변을 작성하려면 로그인이 필요합니다.