I’m following this tutorial on building a widget
IN that tutorial, he’s testing whether jquery exists on the page and, if not, loading it.
I’ve recreated his code in this fiddle
I’ve added another object, CssLoader, but I’m unable to use jquery inside that object. You can see that my alert is not working.
How should I ensure jquery is available in CssLoader and any other objects I create?
I’ve just tweaked your code
And inside function
maincallCssLoader.initas followsDEMO.