У меня есть следующий бит jQuery, в котором работает слайдер. Я бы хотел, чтобы он начинался автоматически и останавливался при наведении.Можете ли вы помочь мне автоматизировать это?
Здесь находится в стадии тестирования: (Это не мой код, кстати, что это из шаблона)
http://webcontentmanager.co.uk/clients/alex/testing-2.html
JQuery, который работает этот ползунок выглядит следующим образом:
/*!Full-width scroller*/
$(".fullwidth-slider li").not(".text-on-img .fullwidth-slider li").each(function() {
var $_this = $(this),
this_img = $_this.find("img").width();
$_this.css({"width": this_img + 20});
$(".fs-entry-content", $_this).css("opacity", "1");
$($_this).css("opacity", "1")
});
$(".fullwidth-slider").each(function() {
var $this = $(this),
$this_par = $(this).parent(),
$this_img = $this.find("img").attr("height"),
$this_top = $this.position().top,
scroller = $this.theSlider({
mode: "scroller"
}).data("theSlider");
$(".prev, .next", $this_par).css({
height: $this_img
});
$(".related-projects .prev, .related-projects .next").css({
top: $this_top + "px"
});
$(".prev i", $this_par).click(function() {
if (!scroller.noSlide) scroller.slidePrev();
});
$(".next i", $this_par).click(function() {
if (!scroller.noSlide) scroller.slideNext();
});
scroller.ev.on("updateNav sliderReady", function() {
if (scroller.lockRight) {
$(".next", $this_par).addClass("disabled");
}
else {
$(".next", $this_par).removeClass("disabled");
};
if (scroller.lockLeft) {
$(".prev", $this_par).addClass("disabled");
}
else {
$(".prev", $this_par).removeClass("disabled");
};
});
});
Почему бы вам не отредактировать мои комментарии? Не имеет смысла менять почту без причины. Вы вытащили мои просьбы, и спасибо, чему меня учили, было вежливо ... –
Можете ли вы опубликовать скрипку или ссылку на страницу, где мы можем увидеть это, пожалуйста. –
Вы не можете отправить jsfiddle, чтобы понять, что происходит? – Pesulap