/ / Bildlauf oben in der Animationsfunktion an oberster Position im IE - Javascript, jquery

Blättern Sie oben in der Animate-Funktion, die oberste Position in IE - javascript, jquery

Scrollen Sie nach oben in der animierten Funktion und lassen Sie sie in IE an der obersten Position ruhen. Siehe mein Skript unten.

Mein Skript

//Scroll Using Click
$(document).ready(function () {
// Add smooth scrolling to all links
$(".scrollTo").on("click", function (event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;

// Using jQuery"s animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
$("html, body").animate({
scrollTop: $(hash).offset().top - 100
}, 800, function () {
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
});

Antworten:

0 für die Antwort № 1

IE Browser Scroll Top Position Problem behoben durch Entfernen der Funktion von der Animationsfunktion.