Basically I have a script.js
in my website that does this:
if (someVar){
document.write('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"><\/script>');
}
Now I would like to attack some behaviour:
if (someVar){
document.write('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"><\/script>');
$(document).ready(function(){
//> Do stuff
});
}
But I got undeclared function $
in console