4ad4a07a6 use on() to listen for the load event
de54ab2a5 use on() to listen for the load event
Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
//roll up a little to show the titles
if (this.options.deepLinkSmudge) {
var _this = this;
- $(window).load(function() {
+ $(window).on('load', function() {
var offset = _this.$element.offset();
$('html, body').animate({ scrollTop: offset.top }, _this.options.deepLinkSmudgeDelay);
});
}
if(isActive && _this.options.autoFocus){
- $(window).load(function() {
+ $(window).on('load', function() {
$('html, body').animate({ scrollTop: $elem.offset().top }, _this.options.deepLinkSmudgeDelay, () => {
$link.focus();
});