javascript - Trying to understand how scripts should be added and in what order - experiencing difficulties -
i'm having difficulties seems issue order import js src.
i'm pretty new js / jquery part have taken granted needed include 1 script , has been working fine.
i have contact page, on page there google map , form, form relies on som js pretty , validate inputs.
these working fine.
i've updated login box in header, dropdown uses simple jquery function display when selected.
now have script in place cannot them work together, i've tried various combinations none work must missing that's important, please explain?
these examples:
the map displays , login function contained within "helperfunctions" whilst form function calls within "ourcontactform"
1 : form displays correctly, login not work
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="js/map.js"></script> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <!--disable zoom pinch--> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script src="js/helperfunctions.js"></script> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript"> google.load("jquery", "1.3.2"); </script> <script type="text/javascript" src="js/jquery.jqtransform.js"></script> <script type="text/javascript" src="js/jquery.validate.js"></script> <script type="text/javascript" src="js/jquery.form.js"></script> <script type="text/javascript" src="js/ourcontactform.js"></script>
2 : form doesn't display how should yet login does
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="js/map.js"></script> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <!--disable zoom pinch--> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript"> google.load("jquery", "1.3.2"); </script> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script src="js/helperfunctions.js"></script> <script type="text/javascript" src="js/jquery.jqtransform.js"></script> <script type="text/javascript" src="js/jquery.validate.js"></script> <script type="text/javascript" src="js/jquery.form.js"></script> <script type="text/javascript" src="js/ourcontactform.js"></script>
other permutations result not great deal of working.
thanks help
edit: using details on jquery documentation solved :) http://jquery.com/download/
in both examples include both jquery 1.3.2 , latest one. why? guess, plugins work other version of jquery. check , include one.
Comments
Post a Comment