jQuery/jQueryUI conflict

javascript, jquery

Solution

If you want to include both the js files you can..

 <!-- load jQuery 1_8_3 -->
    <script  src="../assets/js/jquery-1.8.3.min.js"></script> 
    <script type="text/javascript">
    var jQuery_1_8_3 = $.noConflict(true);
    </script>

    <!-- load jQuery 1.4.2 -->
    <script type="text/javascript" src="jquery/jquery-1.4.2.js"></script>
    <script type="text/javascript">
    var jQuery_1_4_2= $.noConflict(true);
    </script>

Its better to avoid multiple versions in the page..and its better to use appropriate jquery-UI Version with the jquery version

Problem

I am using some jquery files for auto complete and datetime picker control but 3 files among them are conflicting: Two files for autocomplete are ``` <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> ``` One file for Calender datetime picker is: ``` <script src="../assets/js/jquery-1.8.3.min.js"></script> ``` These 3 files are confilicting when i comment date time picker file autocomplete works and if I uncomment it autocomplete stops.

Original source