I’m making a bookmarklet and using jQuery for it (with noConflict). I need to wait for jQuery to load, to execute all the jQuery code.
I know I can check with typeof $ for jQuery, but I’m actually more looking for an event handler. Right now I’m just using setTimeout with a delay of 1s, because jQuery is proberly loaded then.
I feel this is not a good solution. It’s not clean code and relies on jQuery to load in 1s.
Is there any other way to afford this?
Since you say you’re appending it dynamically, you could make use of
onload: