[OpenLayers-Users] jQuery/OpenLayers-2.8 conflict

P Kishor punk.kish at gmail.com
Sat Jan 30 13:20:01 EST 2010


On Sat, Jan 30, 2010 at 8:50 AM, AlessioDL <alessio.dilorenzo at gmail.com> wrote:
>
> Hi list,
> http://faq.openlayers.org/misc/why-doesnt-openlayers-work-with-jquery/ This
> page tells that the conflict issue between jQuery/OL "is fixed by default in
> release 2.8 and later".
>
> Probably I'm doing something wrong, but it seems that it is not true for
> Firefox.
>
> This is my code (very simple):
>
> <html>
>        <head>
>                <title>jQuery | OpenLayers</title>
>
>                <!-- OpenLayers -->
>                <script type="text/javascript"
> src="JsLib/OpenLayers-2.8/lib/OpenLayers.js" />


explicitly close the script tag with </script>


>
>                <!-- jQuery UI -->
>                <link type="text/css"
> href="JsLib/jquery-ui-1.7.2.custom/css/humanity/jquery-ui-1.7.2.custom.css"
> rel="Stylesheet" /><br>
>                <script type="text/javascript"
> src="JsLib/jquery-ui-1.7.2.custom/js/jquery-1.3.2.min.js"></script><br>
>                <script type="text/javascript"
> src="JsLib/jquery-ui-1.7.2.custom/js/jquery-ui-1.7.2.custom.min.js"></script>
>
>                <script type="text/javascript">
>
>                        $(document).ready(function()
>                        {
>                                $("#accordion").accordion({animated:'bounceslide'});
>                        });
>                </script>
>
>                <script type="text/javascript">
>                        var map = new OpenLayers.Map('map');
>                </script>
>
>        </head>
>        <body>
>                <div id="map">
>                </div>
>
>                <div id="accordion">
>                        <h3> # Pannello A </h3>
>                        <div>...</div>
>                        <h3> # Pannello B </h3>
>                       <div>...</div>
>                </div>
>        </body>
> </html>
>
> This code works for Safari and Chrome, but not for Firefox (3.6).
> Firebug reports me 2 errors:
> jQuery is not defined
> $(document).ready is not a function
> --
> View this message in context: http://n2.nabble.com/jQuery-OpenLayers-2-8-conflict-tp4485516p4485516.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
Sent from Madison, Wisconsin, United States



More information about the Users mailing list