1
내가하려고하는 것은 마우스가 '다음'버튼 위에있는 경우 느린 속도로 오른쪽으로 스크롤하고 마우스가 '다음'버튼 위에 있지 않으면 스크롤을 멈 춥니 다. 바이올린 여기jquery scrollLeft auto?
var $container = $('#display-container'),
scroll = $container.width();
$('#next-button').hover(function() {
$container.animate({
'scrollLeft': scroll
}, 500);
}, function(){
$container.stop();
});
것 : 여기
는 http://jsfiddle.net/mdanz/nCCRy/14/$(function() {
$('#next-button').hover(function() {
$('#display-container').animate({
'scrollLeft': '+=120px'
}, '500');
});
});
감사하지만 내가 어떻게가의 끝까지 scrollLeft에 어떻게해야합니까 호버에서 div? 120px를 넣었지만 div의 끝까지 스크롤 할 때까지 무한대로 scrollleft하고 싶습니다. – user892134
또한 첫 번째 함수 뒤에 쉼표를 추가하고 다른 함수를 넣을 때 용어는 무엇입니까? 대체 기능? – user892134
@ user892134 - 내 업데이트를 참조하십시오. –