Michael Geary schrieb: >>> 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;
Mike, thank you, I was thinking about that all day, sometimes that boolean logic thing causes me headache... Is also possible? if ( !(window.GBrowserIsCompatible && GBrowserIsCompatible()) ) If you don't say yes my headache gets worse! -- Klaus _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/