I'm loading a HTML page using jQuery's .load method:
$(document).ready(function() {
$('#body_dynamic_css').load('/url/to/page');
});
I recently updated the version of jQuery to 1.7.2 from 1.4.2. I used to be able to use jGrowl after loading the additional page but now I can't. If I look at the console of the loaded page I have jGrowl and if I remove the load statement from the original page I have jGrowl but as soon as load is called I no longer have jGrowl. Even doing the following works.
$(document).ready(function() {
$('#body_dynamic_css').load('/url/to/page', function() {
$.jGrowl('Hello StackOverflow');
});
});
The exact error message I'm getting is:
Uncaught TypeError: Object function (a,b){return new e.fn.init(a,b,h)} has no method 'jGrowl'
This happens when the original page calls
$(document).ready(function() {
// Do stuff here
$.jGrowl('message');
// Do stuff here
});
From an externally loaded javascript file.
<script src="/assets/app.js" type="text/javascript" charset="utf-8"></script>
Any suggestions would be greatly appreciated.