I currently have the following:
var scrollingAnchorIds = []; var getTheseIds = $(\".anchor-content\").each(function() { scrollingAnchorIds.push($(th
When thinking about it, most of your code seems excessive. Try something like this:
$(function(){ $('html,body').animate({scrollTop: $("[data-load-id='" + window.location.hash + "']").offset().top - 50},850); });
I made a fiddle also, though window.location.hash does not work in this.