I know how to do core callbacks and functions but I would like this use case:
loadCSSFunction('/stylesheets/swiper.css',function (e){
Execute code
//Do some jquery call to a plugin for example
});
How do I construct the loadCSSFunction to be able to form these functions, so once the action has taken place (injecting CSS into head (which I am fine with)) I can then execute something that relies on that CSS injection.
Update: Please note the CSS element of this is not relevant, its just part of the example and not relevant to the question. If I did want to inject it async etc I will do.
Function call:
doSomethingWithFile('/folder/file.file',function (e){
Execute code
});
Function:
doSomethingWithFile: function(file){
var mything = 'thing'+file;
}