javascript - Leaflet and jQuery mobile won't cooperate -
everyone. i'm working on mobile app nature reserve (the old map built flash), , i'm having trouble jquery mobile , leaflet. stands, can either leaflet map or jquery navbar. below html section:
<!doctype html> <html> <head> <title>uw arboretum</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <link rel="apple-touch-icon" href="images/logo.png"/> <!-- <meta name="mobileoptimized" content="320" /> --> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" /> <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"> </script> <link rel="stylesheet" href="css/leaflet.css" /> <link rel="stylesheet" href="css/style.css" /> <script src="js/leaflet-src.js"></script> <script src="js/jquery.js"></script> <script src="lib/jquery-ui/js/jquery-ui-1.10.1.custom.min.js"></script> <script src="js/main.js"></script> </head> <body> <div id="map"> </div><!--map--> <div data-role="footer" data-position="fixed"> <div data-role="navbar"> <ul> <li><a href="#abcdefg" class="ui-state-persist" data-icon="arrow-r">abc</a></li> <li><a href="#abcdefg" class="ui-state-persist" data-icon="arrow-r">def</a></li> <li><a href="#abcdefg" class="ui-state-persist" data-icon="arrow-r">ghi</a></li> <li><a href="#abcdefg" class="ui-state-persist" data-icon="arrow-r">jkl</a></li> </ul> </div><!--footer--> </body> </html> </body> </html>
you have double jquery loading:
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script src="js/jquery.js"></script>
also try using newest versions of jquery , jquery mobile
Comments
Post a Comment