Take care not to clobber any previously set window.$ value. IE, in its mysterious ways, sets $ to undefined if we have a conditional 'var $ = somefunc;' expression - even if the condition evaluates to false. Problem does not occur if expression is 'window.$ = somefunc;'. This makes OL play nicely with jQuery (among others) in IE. r=crschmidt (pullup #1391)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9400 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -32,10 +32,10 @@ OpenLayers.Util.getElement = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Maintain $() from prototype
|
||||
* Maintain existing definition of $.
|
||||
*/
|
||||
if ($ == null) {
|
||||
var $ = OpenLayers.Util.getElement;
|
||||
if(typeof window.$ === "undefined") {
|
||||
window.$ = OpenLayers.Util.getElement;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user