views:

275

answers:

3

I'm using jquery and googlemaps (gmap2). I am finding issues with using the jquery selectors for class divs on the map. When I try to select the div (both ID and classes) I get a null return. I am guessing there's some kind of conflict with the JS google maps. To verify that my jquery is correct, I have tried to select tags and different id/classes, that works.

Can anyone suggest what is the cause or work around?

I am using jq 1.3.2

A: 

I've used jquery mixed with google maps with no issues. Could you post some code?

ScottE
A: 

Google maps doesn't like the array of objects jquery's selector engine returns. similarly jquery doesn't seem to like document.getElementById's raw output, so you'd need to do..

var el = document.getElementById("your-element");
var jQel = $(el);

..you can then pass el to the google maps API and jQel to jQuery. Although obviously if you can avoid using jQuery at all your code will be more efficient.

ryan j
A: 

Turns out someone had redefined $ as another function and used noconflict

Joe