Skip to content

defer loading of the javacripts plugins #14023

@bassjobsen

Description

@bassjobsen

The javascripts plugins such as affix and scrollspy use $(window).on('load', function () for initialisation. When defer loading (after window.onload) jquery and / or the plugins, the onload event has already been fired before the code loads.

For this reason i wonder if the plugin can be initialised with something like this:

if (document.readyState !== "loading") init();
else $(window).on('load',init );

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions