hi, i havent tried this, but i think you shouldnt have to alias jquery as JQ, just use jQuery (where you'd normally use $), and include it _after_ any prototype/OL stuff. <br>the jquery srcipt checks if $ exists, if so, it doesnt create that namespace.
<br>-brent<br><br><br><div><span class="gmail_quote">On 11/21/06, <b class="gmail_sendername">Daniel Kastl</b> <<a href="mailto:daniel.kastl@gmx.de">daniel.kastl@gmx.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi list,<br><br>While with version 2.1 of OpenLayers there was no problem to use both<br>OpenLayers' Prototype and jQuery javascript framework, it doesn't work<br>anymore with version 2.2.<br><br>Firebug error message:<br>
"this.div.appendChild is not a function" in Map.js (line 136):<br>this.div.appendChild(this.viewPortDiv);<br><br>I followed the jQuery guide how to run jQuery together with Prototype<br>library (<a href="http://jquery.com/docs/PrototypeAndJQuery/">
http://jquery.com/docs/PrototypeAndJQuery/</a>)<br><br>I tested with the Wiki example:<br><br><?xml version="1.0" encoding="UTF-8" ?><br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<br>"xhtml1-transitional.dtd"><br><html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>" xml:lang="jp" lang="jp"><br><head><br> <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<br> <title>OpenLayers Demo</title><br><br> <!-- jQuery --><br> <script type="text/javascript"<br>src="<a href="http://jquery.com/src/jquery-latest.pack.js">http://jquery.com/src/jquery-latest.pack.js
</a>"></script><br> <script type="text/javascript"><br> JQ = $; // rename $ function to use jQuery together with Prototype<br> </script><br><br> <!-- OpenLayers --><br> <script type="text/javascript" src="./2.2/lib/OpenLayers.js"></script>
<br></head><br><br><body><br> <div id="map" style="width:100%;height:100%;"></div><br> <script defer="defer" type="text/javascript"><br> var map = new
OpenLayers.Map('map');<br> var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",<br> "<a href="http://labs.metacarta.com/wms/vmap0">http://labs.metacarta.com/wms/vmap0</a>", {layers: 'basic'} );
<br> map.addLayer(wms);<br> map.zoomToMaxExtent();<br> </script><br></body><br><br>Would be nice somebody knows a solution how to use both, OpenLayers and<br>jQuery.<br><br>Daniel<br><br><br>_______________________________________________
<br>Users mailing list<br><a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br></blockquote></div><br>