0
a web site 페이지가로드 될 때 자동으로 슬라이드하는 jQuery 슬라이더가 있습니다. 마우스를 움직일 때 슬라이더를 멈추게하려면 어떻게합니까?마우스를 가져 가면 JQuery 슬라이더가 중지됩니다.
var my_jQuery = jQuery.noConflict(true);
window.onload = function() {
// added by pesach
var totalWidth=0;
var numItems=0;
my_jQuery('li', 'div#scroll_Bar').each (function() {
totalWidth = totalWidth + my_jQuery(this).outerWidth() + 1;
numItems = numItems + 1;
});
//alert(totalWidth * -1);
my_jQuery('ul', 'div#scroll_Bar').width(totalWidth);
var slidewidth = totalWidth - 960;
//end of addition
var container = $('div#scroll_Bar');
var ul = $('ul', container);
var itemsWidth = ul.innerWidth() - container.outerWidth();
//$("div.sliderGallery ul li").hover(stop(true, true), stop(true, true));
my_jQuery('ul', 'div#scroll_Bar').animate({'left' : slidewidth * -1}, numItems * 1000, 'linear');
my_jQuery('ul', 'div#scroll_Bar').animate({'left' : 0}, numItems * 800, 'linear');
my_jQuery('.slider', container).slider({
min: 0,
max: itemsWidth,
handle: '.handle',
stop: function (event, ui) {
ul.animate({'left' : ui.value * -1}, 500),my_jQuery('ul', 'div#scroll_Bar').stop(true, true);
},
slide: function (event, ui) {
ul.css('left', ui.value * -1),my_jQuery('ul', 'div#scroll_Bar').stop(true, true);
}
});
};
을 주셔서 감사합니다 당신의 응답. 코드를 입력 한 후에 마우스를 올려 놓으면 멈추지 않습니다. 당신은 (나는 코드를 추가) 링크를 확인할 수 있습니다. 추가 제안 사항이 있으면 크게 감사하겠습니다. 미리 감사드립니다. – pzirkind