Why this isn’t true?
$('#myId') == document.getElementById("myId")
I’m using JQuery 1.4.2 and trying to insert a GMap into an div element.
So, this works:
new google.maps.Map(document.getElementById("myId"),myOptions);
but this doesn’t
new google.maps.Map($("myId"),myOptions);
You have a couple issues. First, ID selectors use
#. Second,$(...)is a jQuery object, and you need to pass a DOM element.Use
$('#myId').get(0)The get method.