I have a js function using $ in it.
My function uses $get(). and works fine when this function is called from HTL but if I add the function in document.load
$(document).load(function () {
alert("alert");
});
then I get $ is not defined in console.
Only the function which is called in HTL(Sightly) works.
I'm using AEM 6.3.