Closed yanivz closed 5 years ago
@yanivz which version of defer.js are you using?
Closed this issue
Is there any better pattern to solve dependency trees than callbacks?
deferscript("jQuery", false, 80, function() {
deferscript("slickSlider", false, 0, function() {
deferscript("balanceText", false, 0, function() {
});
});
@yanivz you have a number of options to my naive knowledge:
deferscript("jQuery", false, 80, function() {
window.jQueue = window.jQueue || []
window.jQueue.forEach(function(script) { script() })
}
if (jQuery) { dependentScript(jQuery) } else { window.jQueue = window.jQueue || [] window.jQueue.push(dependentScript) }
Describe the bug page breaks and not working good when jquery in page To Reproduce every occurence of jquery $ sign got error