I was wondering if there are any repercussions I can expect when changing from
$(document).ready(function() {...})
to
window.onload = function() {...}
The reason being I am making a widget and do not want to enforce a jQuery include in case the user already has it included in their app, nor do I want them to have to modify the widget code -- so I am dynamically determining if I should include it.
However, in order to dynamically include it, I do not have access to jQuery before the window.onload
, which brings me to my scepticism.
My main worry is that this will disrupt the functionality of the user's app. So... will it?
Thanks in advance.