не срабатывает scrollLeft анимация в firefox
Не срабатывает анимация scrollLeft в Firefox. В Chrome и IE работает. Помогите разобраться. Не могу найти ошибку.
Рабочий примет тут код: $(document).ready(function(){ var destination = 0; var iteration = 0; $("div.nav2").css("display", "none"); function runIt() { if (iteration < 46) { $("body").animate({scrollLeft: '+='+destination}, 10, function(){setTimeout(runIt, 30);}); iteration += 1; } else { iteration = 0; } } $("a#play").click(function() { destination = $("img.frame:first").width(); runIt(); $("div.nav1").css("display", "none"); setTimeout( function() { $("div.nav2").css("display", "block"); }, 400); }); $("a#forward").click(function() { $("body").animate({scrollLeft: 0}, 5000); $("div.nav2").css("display", "none"); setTimeout( function() { $("div.nav1").css("display", "block"); }, 400); }); $(window).scroll(function () { $("div.nav-container").css("display", "none").fadeIn(400); }); }); |
Была таже проблема
Нашел вне рунета: To get it working on Firefox the selector must have $(“html”) in addition to body. See the snippet below: $("html, body").mousewheel(function(event, delta) { this.scrollLeft -= (delta * 30); }); |
прпробуйте $("html, body") или чтото подобное
|
Часовой пояс GMT +3, время: 21:18. |