> > just a little thing: I'd check additionally for existence of > > GBrowserIsCompatible just in case the google maps script > > is not loaded for whatever reason: > > > > if (GBrowserIsCompatible && !GBrowserIsCompatible()) ...
> I changed the check to > > // If we aren't supported, we're done > if (!GBrowserIsCompatible || !GBrowserIsCompatible()) return this; That doesn't do what you want. If GBrowserIsCompatible is not defined, it throws an error when you try to reference it. Try this instead: if (!window.GBrowserIsCompatible || !GBrowserIsCompatible()) return this; Or the way I like to do it: var bc = window.GBrowserIsCompatible; if( !bc || !bc() ) return this; Also, it looks like you may intend gMapNum to be a single global counter, not an individual counter per $().googleMap() call which is how it works now. To make it a global counter, you could do: $.fn.googleMap.gMapNum = 1; and change the place it's referenced to use $.fn.googleMap.gMapNum too. Or do something similar to the first example - at the top of the $.fn.googleMap() function, add: var global = $.fn.googleMap; Then use: global.gMapNum = 1; etc. I like that notation instead of having to repeat the $.fn.whatever each time. -Mike _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
