OK, so you want to use
$.ajax, but you’ve got no
maybe you’re running as a guest on the page (a “widget”/ a “bookmarklet”/ …)
how do you load jQuery, do you inject a
<script> and timeout?
or maybe using the onload/onerror?
even after the jQuery script done loading, there is still an overhead of the framework and the page running other tasks, that might delay the addition of the jQuery framework to the DOM,
but your CODE CAN START RUNNING ANYWAY!!
the following approach may be used on ANY FRAMEWORK!
- download a ‘min.js’ version of your FRAMEWORK
I’ve downloaded ‘jquery-2.1.3.min.js’ to my desktop
- open the file, use Notepad2 or Notepad++ or whatever..,
copy the content, paste it to http://eladkarako.com/old/__work/demo/encodeuricomponent_decodeuricomponent.html
- take the encrypted content add an opening
"and a closing
"(do not use
now you can place it in your code.
DOMNodeInsertedand preform DOM checks, once you’ve identify the FRAMEWORK has done loading, remove the implementation(!!!).
- create new script object and append the FRAMEWORK as text node (don’t use innerHTML!!!)
- the callback will be executed once the condition has set, providing you with an accurate event-based, DOM-safe execution. NO MORE ERROR BECAUSE OF DELAYED LOADING.
- …this is also very effective on Ajax-based pages, or once with heavy-loading
/** * a way to load jQuery: * - without doing ANY requests. * - without using the