Is there a way of initializing the magnific.popup.js after the page loads?
I do not prefer loading it with the rest of the scripts as I only need it, and trigger the popup on a button click.
The ultimate goal is to not see it listed on the report of PageSpeed Insights, what would be your suggestion?
You can add your script dynamically.
function **functionname**(){
var script = document.createElement('script');
script.setAttribute('src',**path or url script**);
document.head.appendChild(script);
}
Call the function as you need the script