jquery - any javascript event for loading external JS on-the-fly? -


I am working on a bookmarklet project which loads the external jQuery.js file like this: < Pre> jq_script = document.createElement ('SCRIPT'); Jq_script.type = 'text / javascript'; Jq_script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js'; Document.getElementsByTagName ('head') [0] .appendChild (jq_script);

But when I try to use jQuery after this, I get:

  Unwanted reference references: jQuery is not defined < / Code>  

On Chrome JS Console

Is there any "event" that is called when a domain instance loads? (Or an event that triggers when an external JS file loads like this?)

Thanks!



Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -