2011-02-04 4 views
1
와 스프라이트의 위치를 ​​이동하면

내가 jQuery로 다른 사업부의 스크롤 위치 온 클릭을 이동 스프라이트하고자하는 이미지가jQuery를

.top-background{ 
    background: url("../images/mainall.jpg") no-repeat scroll 0px 0px transparent; 
    height: 888px; 
    width:1024px; 
} 
여기
+0

http://plugins.jquery.com/project/ScrollTo – Rafay

답변

0
$("#divToClick").click(function(){ 
    $("#yourElementId").scrollTo(//location where to scroll); 

}); 

demo

입니다 도와주세요있다

1

당신은 이전 질문에서 볼 수 있습니다 도움이되기를 바랍니다 About sprites

그리고 다시 스프라이트에 대한 튜토리얼입니다 .. CSS sprite

유 JQuery와 함께하고 싶어 :

$('.top-background').css('background-position', 'position_to_show_next_image'); 

및 이벤트 방법 호버 또는 무엇을 원하는 작업에 첨부 ..