Reputation: 155
How can I initiliaze the google map without using the body tag(body onload=.....)
I can not use: <body onload="initialize()">
I need to use some Javascript to get the same result..but I don't know how, i tried:
<script type='text/javascript'>
$(window).load(function() {
initialize()
});
</script>
But it doesn't work.
Upvotes: 1
Views: 75
Reputation: 1365
If you are using jQuery you can also do it like this:
$(function() {
initialize();
}
Upvotes: 0
Reputation: 155
i just got it:
window.onload = function() {
initialize()
};
Can be closed..
Upvotes: 1