Ссылка на архив сайта: http://rgho.st/7QHT24Q8T
Скролл работает из меню работает во всех браузерах кроме Mozilla Firefox, с чем это может быть связано?
JS:
$(document).ready(function(){
$("#menu").on("click","a", function (event) {
event.preventDefault();
var id = $(this).attr('href'),
top = $(id).offset().top;
$('body,html').animate({scrollTop: top}, 1500);
});
});
$(document).ready(function(){
$(".deactivatemenu").on("click","a", function (event) {
event.preventDefault();
var id = $(this).attr('href'),
top = $(id).offset().top;
$('body,html').animate({scrollTop: top}, 1500);
});
});
$(document).ready(function(){
$(".arrow").on("click","a", function (event) {
event.preventDefault();
var id = $(this).attr('href'),
top = $(id).offset().top;
$('body,html').animate({scrollTop: top}, 1500);
});
});
window.onload = function() {
var scrollUp = document.getElementById('scrollup');
scrollUp.onmouseover = function() {
scrollUp.style.opacity=0.8;
scrollUp.style.filter = 'alpha(opacity=30)';
};
scrollUp.onmouseout = function() {
scrollUp.style.opacity = 1;
scrollUp.style.filter = 'alpha(opacity=50)';
};
scrollUp.onclick = function() {
$('html, body').animate({scrollTop:0}, 1500);
};
window.onscroll = function () {
if ( window.pageYOffset >= 200 ) {
$(scrollup).stop().animate({opacity:'1.0'},100);
scrollup.style.display = 'block';
} else {
$(scrollup).stop().animate({opacity:'0.0'},100);
scrollup.style.display = 'none';
}
};
};
$(document).ready(function(){
$("#menu").on("click","a", function (event) {
event.preventDefault();
var id = $(this).attr('href'),
top = $(id).offset().top;
$('body,html').animate({scrollTop: top}, 1500);
});
});
html, body { width: 100%; }
. Скролл в Firefox я пока не знаю как исправить.