I have created two functional Units on my application page. One comes along in a separate script, the other is embedded via script editor web part.
The external script is called fiirst all the time an I am priming jQuery using
SP.SOD.registerSod('jquery', 'cdn-path/to/jquery');. When the script in my script Editor web part gets hit, I use
SP.SOD.executeFunc('jquery', callback); to assure jQuery is loaded and I can execute my callback.
This does not work, though.
When I reach the second call to
SP.SOD.executeFunc() jQuery is already loaded, the callback just does not get called.
However if I prime the same jQuery script again using
SP.SOD.registerSod('jquery2', path/to/same/jquerycdn) everything works. What am I missing? How can I use jQuery across the scripts?