Hi,
I'm trying to avoid FOUC so I use this tips : https://gist.github.com/johnpolacek/3827270
Then I'm trying to display the page ASAP, before heavy scripts are loaded with this code :
fallback.ready(['jQuery', 'WebFont', 'global_css', 'bootstrap'], function () { $('.no-fouc').removeClass('no-fouc'); });
fallback.load({ ... WebFont: [ 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', '{{ asset('bundles/app/libraries/webfont.js') }}' ], ... }, { callback: function (success, failed) { WebFont.load({ google: { families: ['Noticia+Text:400,400italic, } });
Except WebFont's fonts are not yet loaded (as you can see in the code above).
I don't know how to deal with it, how can I trigger code after WebFont.load is completed ?