This means any object that has been loaded successfully can be detected using square brace notation of the global window object.
if(window['GMap2']) {
var map = new GMap2('map_div');
}
else {
//see the previous post to load the google maps script after the page has been loaded.
}
You can apply this to any external javascript objects.
No comments:
Post a Comment